From e8f098f38e052972901d9376ca702f862e2d46e2 Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 17 Sep 2026 22:18:18 +0000 Subject: [PATCH] test: hoist the json import to module scope Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- tests/test_litellm/litellm_core_utils/test_litellm_logging.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_litellm/litellm_core_utils/test_litellm_logging.py b/tests/test_litellm/litellm_core_utils/test_litellm_logging.py index f226d30fc27..ab8db5cb409 100644 --- a/tests/test_litellm/litellm_core_utils/test_litellm_logging.py +++ b/tests/test_litellm/litellm_core_utils/test_litellm_logging.py @@ -1,6 +1,7 @@ import asyncio import contextlib import datetime +import json import os import sys from collections.abc import Callable @@ -1225,8 +1226,6 @@ async def test_async_success_handler_truncates_large_base64_off_the_event_loop(m monkeypatch.setattr(logging_utils, "_truncate_base64_in_string", recording_scan) monkeypatch.setattr(logging_utils, "BASE64_TRUNCATION_OFFLOAD_THRESHOLD_CHARS", 1_000) - import json - logged = asyncio.Event() captured: dict = {}