diff --git a/tests/test_litellm/litellm_core_utils/test_call_completion.py b/tests/test_litellm/litellm_core_utils/test_call_completion.py index 6441cff7b3c..46a811c0e21 100644 --- a/tests/test_litellm/litellm_core_utils/test_call_completion.py +++ b/tests/test_litellm/litellm_core_utils/test_call_completion.py @@ -220,7 +220,7 @@ async def test_async_ocr_wrapper_sends_final_failure_to_attached_completion( monkeypatch.setattr("litellm.utils.load_credentials_from_list", MagicMock()) wrapped: Final = client(aocr) - with pytest.raises(ValueError) as caught: + with pytest.raises(ValueError, match="mapped OCR failure") as caught: await wrapped() assert caught.value is mapped_error