mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 10:14:26 +00:00
remove outdated test
This commit is contained in:
parent
bcbd5cb27e
commit
ec11f3029c
1 changed files with 1 additions and 19 deletions
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue