From d3c58cc991b45a0c7de7c97247f976d2361bd97a Mon Sep 17 00:00:00 2001 From: Ricky-7-Yan <2314530442@qq.com> Date: Mon, 31 Aug 2026 22:45:24 +0800 Subject: [PATCH] test(infinity): colocate error regression coverage --- tests/llm_translation/test_infinity.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/llm_translation/test_infinity.py b/tests/llm_translation/test_infinity.py index 1829113e045..199b75485a1 100644 --- a/tests/llm_translation/test_infinity.py +++ b/tests/llm_translation/test_infinity.py @@ -5,6 +5,7 @@ from unittest.mock import AsyncMock import litellm +from litellm.llms.infinity.common_utils import InfinityError from unittest.mock import patch, MagicMock @@ -17,6 +18,14 @@ from litellm.llms.custom_httpx.http_handler import HTTPHandler, AsyncHTTPHandler from litellm.types.utils import EmbeddingResponse, Usage +def test_infinity_error_default_headers_are_not_shared() -> None: + first_error = InfinityError(status_code=500, message="first") + second_error = InfinityError(status_code=500, message="second") + + assert first_error.headers is None + assert second_error.headers is None + + @pytest.mark.asyncio() async def test_infinity_rerank(): mock_response = AsyncMock()