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: remove the five test functions a later definition shadows (#37591)

yuneng-jiang76aa13cde06f
diff --git a/tests/llm_translation/test_bedrock_completion.py b/tests/llm_translation/test_bedrock_completion.py
index c6d02930f8b..8dcae7cc997 100644
--- a/tests/llm_translation/test_bedrock_completion.py
+++ b/tests/llm_translation/test_bedrock_completion.py
@@ -1195,23 +1195,6 @@ def test_not_found_error():
)
- "model",
- [
- "bedrock/us.anthropic.claude-3-haiku-20240307-v1:0",
- "bedrock/us.meta.llama3-2-11b-instruct-v1:0",
- ],
-)
-def test_bedrock_cross_region_inference(model):
- litellm.set_verbose = True
- response = completion(
- model=model,
- messages=messages,
- max_tokens=10,
- temperature=0.1,
- )
-
-
@pytest.mark.parametrize(
"model, expected_base_model",
[
diff --git a/tests/llm_translation/test_openai.py b/tests/llm_translation/test_openai.py
index 22acffd535f..1a14b00c7d7 100644
--- a/tests/llm_translation/test_openai.py
+++ b/tests/llm_translation/test_openai.py
@@ -285,12 +285,6 @@ class TestOpenAIChatCompletion(BaseLLMChatTest):
"""Test that tool calls with no arguments is translated correctly. Relevant issue: https://github.com/BerriAI/litellm/issues/6833"""
pass
- def test_prompt_caching(self):
- """
- Test that prompt caching works correctly.
- Skip for now, as it's working locally but not in CI
- """
- pass
def test_prompt_caching(self):
"""
diff --git a/tests/local_testing/test_completion_cost.py b/tests/local_testing/test_completion_cost.py
index cf0c645615d..551b3f064bb 100644
--- a/tests/local_testing/test_completion_cost.py
+++ b/tests/local_testing/test_completion_cost.py
@@ -2762,11 +2762,6 @@ def model_item():
}
[email protected]("base_model_arg", ["litellm_param", "model_info"])
-def test_cost_calculator_with_base_model_with_router(base_model_arg, model_item):
- from litellm import Router
-
-
@pytest.mark.parametrize("base_model_arg", ["litellm_param", "model_info"])
def test_cost_calculator_with_base_model_with_router(base_model_arg):
from litellm import Router
diff --git a/tests/logging_callback_tests/test_sqs_logger.py b/tests/logging_callback_tests/test_sqs_logger.py
index f141ef14b25..31e9ffc5517 100644
--- a/tests/logging_callback_tests/test_sqs_logger.py
+++ b/tests/logging_callback_tests/test_sqs_logger.py
@@ -150,30 +150,6 @@ async def test_async_sqs_logger_error_flush():
# =============================================================================
-async def test_async_log_success_event_adds_to_queue(monkeypatch):
- monkeypatch.setattr("litellm.aws_sqs_callback_params", {})
- logger = SQSLogger(sqs_queue_url="https://example.com", sqs_region_name="us-west-2")
-
- fake_payload = {"some": "data"}
- await logger.async_log_success_event(
- {"standard_logging_object": fake_payload}, None, None, None
- )
- assert fake_payload in logger.log_queue
-
-
-async def test_async_log_failure_event_adds_to_queue(monkeypatch):
- monkeypatch.setattr("litellm.aws_sqs_callback_params", {})
- logger = SQSLogger(sqs_queue_url="https://example.com", sqs_region_name="us-west-2")
-
- fake_payload = {"fail": True}
- await logger.async_log_failure_event(
- {"standard_logging_object": fake_payload}, None, None, None
- )
- assert fake_payload in logger.log_queue
-
-
# =============================================================================
# 🧾 async_send_batch Tests
# =============================================================================
diff --git a/tests/proxy_unit_tests/conftest copy.py b/tests/proxy_unit_tests/conftest copy.py
deleted file mode 100644
index 1421700c9a8..00000000000
--- a/tests/proxy_unit_tests/conftest copy.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# conftest.py
-
-import importlib
-import os
-import sys
-
-import pytest
-
-sys.path.insert(
- 0, os.path.abspath("../..")
-) # Adds the parent directory to the system path
-import litellm
-
-
[email protected](scope="function", autouse=True)
-def setup_and_teardown():
- """
- This fixture reloads litellm before every function. To speed up testing by removing callbacks being chained.
- """
- curr_dir = os.getcwd() # Get the current working directory
- sys.path.insert(
- 0, os.path.abspath("../..")
- ) # Adds the project directory to the system path
-
- import litellm
- from litellm import Router
-
- importlib.reload(litellm)
- try:
- if hasattr(litellm, "proxy") and hasattr(litellm.proxy, "proxy_server"):
- importlib.reload(litellm.proxy.proxy_server)
- except Exception as e:
- print(f"Error reloading litellm.proxy.proxy_server: {e}")
-
- import asyncio
-
- loop = asyncio.get_event_loop_policy().new_event_loop()
- asyncio.set_event_loop(loop)
- print(litellm)
- # from litellm import Router, completion, aembedding, acompletion, embedding
- yield
-
- # Teardown code (executes after the yield point)
- loop.close() # Close the loop created earlier
- asyncio.set_event_loop(None) # Remove the reference to the loop
-
-
-def pytest_collection_modifyitems(config, items):
- # Separate tests in 'test_amazing_proxy_custom_logger.py' and other tests
- custom_logger_tests = [
- item for item in items if "custom_logger" in item.parent.name
- ]
- other_tests = [item for item in items if "custom_logger" not in item.parent.name]
-
- # Sort tests based on their names
- custom_logger_tests.sort(key=lambda x: x.name)
- other_tests.sort(key=lambda x: x.name)
-
- # Reorder the items list
- items[:] = custom_logger_tests + other_tests