From 915131f75beb61731b501e17f0f12cc4bb25b5b4 Mon Sep 17 00:00:00 2001 From: yucheng Date: Fri, 25 Sep 2026 17:59:05 +0000 Subject: [PATCH] style(tests): ruff format the Prometheus fail-open registry test Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../test_prometheus_queue_guardrail_metrics.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/tests/test_litellm/integrations/test_prometheus_queue_guardrail_metrics.py b/tests/test_litellm/integrations/test_prometheus_queue_guardrail_metrics.py index 9d608594047..09ac4f3addf 100644 --- a/tests/test_litellm/integrations/test_prometheus_queue_guardrail_metrics.py +++ b/tests/test_litellm/integrations/test_prometheus_queue_guardrail_metrics.py @@ -158,9 +158,7 @@ class TestPrometheusQueueTimeMetric: if len(call[0]) > 0 and call[0][0] == 0.5: # Our test queue time value queue_time_called = True break - assert ( - not queue_time_called - ), "Queue time metric should not be recorded when queue_time_seconds is missing" + assert not queue_time_called, "Queue time metric should not be recorded when queue_time_seconds is missing" def test_queue_time_metric_not_recorded_when_negative(self): """Test that queue time metric is not recorded when queue_time_seconds is negative""" @@ -224,9 +222,7 @@ class TestPrometheusQueueTimeMetric: if len(call[0]) > 0 and call[0][0] == -0.1: negative_value_called = True break - assert ( - not negative_value_called - ), "Queue time metric should not be recorded for negative values" + assert not negative_value_called, "Queue time metric should not be recorded for negative values" class TestPrometheusTotalLatencyMetric: @@ -399,9 +395,7 @@ class TestPrometheusGuardrailMetrics: error_type="none", hook_type=hook_type, ) - mock_latency_metric.labels.return_value.observe.assert_called_once_with( - latency_seconds - ) + mock_latency_metric.labels.return_value.observe.assert_called_once_with(latency_seconds) # Assert - requests metric should be incremented mock_requests_metric.labels.assert_called_once_with( @@ -450,9 +444,7 @@ class TestPrometheusGuardrailMetrics: error_type=error_type, hook_type=hook_type, ) - mock_latency_metric.labels.return_value.observe.assert_called_once_with( - latency_seconds - ) + mock_latency_metric.labels.return_value.observe.assert_called_once_with(latency_seconds) # Assert - requests metric should be incremented mock_requests_metric.labels.assert_called_once_with(