remove outdated test

This commit is contained in:
Ishaan Jaff 2025-04-10 14:52:14 -07:00
parent bcbd5cb27e
commit ec11f3029c

View file

@ -39,7 +39,7 @@ import time
@pytest.fixture
def prometheus_logger():
def prometheus_logger() -> PrometheusLogger:
collectors = list(REGISTRY._collector_to_names.keys())
for collector in collectors:
REGISTRY.unregister(collector)
@ -1212,24 +1212,6 @@ async def test_initialize_remaining_budget_metrics_exception_handling(
prometheus_logger.litellm_remaining_api_key_budget_metric.assert_not_called()
def test_initialize_prometheus_startup_metrics_no_loop(prometheus_logger):
"""
Test that _initialize_prometheus_startup_metrics handles case when no event loop exists
"""
# Mock asyncio.get_running_loop to raise RuntimeError
litellm.prometheus_initialize_budget_metrics = True
with patch(
"asyncio.get_running_loop", side_effect=RuntimeError("No running event loop")
), patch("litellm._logging.verbose_logger.exception") as mock_logger:
# Call the function
prometheus_logger._initialize_prometheus_startup_metrics()
# Verify the error was logged
mock_logger.assert_called_once()
assert "No running event loop" in mock_logger.call_args[0][0]
@pytest.mark.asyncio(scope="session")
async def test_initialize_api_key_budget_metrics(prometheus_logger):
"""