litellm/tests/test_litellm/llms/watsonx
shin-bot-litellm 1d92968e17
Fix test isolation for test_watsonx_gpt_oss_prompt_transformation (#20474)
Set cached tokenizer config directly and mock both sync and async
tokenizer functions to avoid race conditions when running with
parallel test execution (-n 16).

The issue was that parallel tests could populate the
litellm.known_tokenizer_config cache between clearing it and
when the code checked it. This caused the sync code path to be
used instead of the async path, bypassing the mocked async functions.

Fix:
1. Set cache directly instead of clearing it
2. Also mock sync versions _get_tokenizer_config and _get_chat_template_file

This ensures the test is deterministic regardless of test execution order.
2026-02-05 12:57:20 -08:00
..
audio_transcription chore: allow passing scope id for watsonx inferencing (#18959) 2026-01-14 03:47:20 +05:30
__init__.py [Feat] Add audio transcriptions for WatsonX (#17160) 2025-11-26 14:15:49 -08:00
test_watsonx.py Fix test isolation for test_watsonx_gpt_oss_prompt_transformation (#20474) 2026-02-05 12:57:20 -08:00
test_watsonx_common_utils.py Add WATSONX_ZENAPIKEY 2026-01-30 13:52:56 -08:00