From 9f2053e4afb4a7c4977b6f79c79008889915f503 Mon Sep 17 00:00:00 2001 From: Krish Dholakia Date: Fri, 8 Nov 2024 19:14:16 +0530 Subject: [PATCH] ci(conftest.py): reset conftest.py for local_testing/ (#6657) * ci(conftest.py): reset conftest.py for local_testing/ check if that speeds up testing * fix: fix import * fix(conftest.py): fix import to check if hasattr * fix(conftest.py): ignore proxy reload if doesn't exist --- tests/local_testing/conftest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/local_testing/conftest.py b/tests/local_testing/conftest.py index 1421700c9..b3561d8a6 100644 --- a/tests/local_testing/conftest.py +++ b/tests/local_testing/conftest.py @@ -26,8 +26,11 @@ def setup_and_teardown(): from litellm import Router importlib.reload(litellm) + try: if hasattr(litellm, "proxy") and hasattr(litellm.proxy, "proxy_server"): + import litellm.proxy.proxy_server + importlib.reload(litellm.proxy.proxy_server) except Exception as e: print(f"Error reloading litellm.proxy.proxy_server: {e}")