Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

test(unit): stop test modules from putting their own directory on sys.path (#43421)

yuneng-jiang37be82e45e56
diff --git a/tests/unit/llms/custom_httpx/test_gemini_session_leak.py b/tests/unit/llms/custom_httpx/test_gemini_session_leak.py
index 9a4c6164db6..6483fcaa389 100755
--- a/tests/unit/llms/custom_httpx/test_gemini_session_leak.py
+++ b/tests/unit/llms/custom_httpx/test_gemini_session_leak.py
@@ -11,13 +11,9 @@ Validates that:
import asyncio
import gc
import sys
-from pathlib import Path
import pytest
-# Add litellm to path
-sys.path.insert(0, str(Path(__file__).parent))
-
async def test_aiohttp_handler_cleanup():
"""Test BaseLLMAIOHTTPHandler session cleanup via __del__"""
diff --git a/tests/unit/test_ssl_verify_unit.py b/tests/unit/test_ssl_verify_unit.py
index f47cdf3e6cd..5384414e18e 100644
--- a/tests/unit/test_ssl_verify_unit.py
+++ b/tests/unit/test_ssl_verify_unit.py
@@ -5,15 +5,10 @@ These tests verify that ssl_verify parameters are correctly propagated
through the call stack without requiring live API credentials.
"""
-import sys
-from pathlib import Path
from unittest.mock import Mock, patch
import pytest
-# Add litellm to path
-sys.path.insert(0, str(Path(__file__).parent))
-
import litellm.proxy.guardrails.guardrail_hooks.aim.aim as _aim_module
import litellm.proxy.guardrails.guardrail_hooks.cato_networks.cato_networks as _cato_networks_module
from litellm.llms.bedrock.base_aws_llm import BaseAWSLLM