chore: apply ruff auto-fixes and remove dead AST scripts
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import pytest
|
||||
from unittest.mock import patch, MagicMock
|
||||
from unittest.mock import patch
|
||||
import importlib.util
|
||||
import sys
|
||||
import os
|
||||
@@ -61,7 +61,7 @@ def test_telemetry_panel_updates_correctly(app_instance: Any) -> None:
|
||||
patch('dearpygui.dearpygui.set_value') as mock_set_value, \
|
||||
patch('dearpygui.dearpygui.configure_item') as mock_configure_item, \
|
||||
patch('dearpygui.dearpygui.is_item_shown', return_value=False), \
|
||||
patch('dearpygui.dearpygui.does_item_exist', return_value=True) as mock_does_item_exist:
|
||||
patch('dearpygui.dearpygui.does_item_exist', return_value=True):
|
||||
# 4. Call the method under test
|
||||
app_instance._refresh_api_metrics()
|
||||
# 5. Assert the results
|
||||
@@ -88,11 +88,11 @@ def test_cache_data_display_updates_correctly(app_instance: Any) -> None:
|
||||
expected_text = "Gemini Caches: 5 (12.1 KB)"
|
||||
# 3. Patch dependencies
|
||||
app_instance._last_bleed_update_time = 0 # Force update
|
||||
with patch('ai_client.get_gemini_cache_stats', return_value=mock_cache_stats) as mock_get_cache_stats, \
|
||||
with patch('ai_client.get_gemini_cache_stats', return_value=mock_cache_stats), \
|
||||
patch('dearpygui.dearpygui.set_value') as mock_set_value, \
|
||||
patch('dearpygui.dearpygui.configure_item') as mock_configure_item, \
|
||||
patch('dearpygui.dearpygui.is_item_shown', return_value=False), \
|
||||
patch('dearpygui.dearpygui.does_item_exist', return_value=True) as mock_does_item_exist:
|
||||
patch('dearpygui.dearpygui.does_item_exist', return_value=True):
|
||||
# We also need to mock get_history_bleed_stats as it's called in the same function
|
||||
with patch('ai_client.get_history_bleed_stats', return_value={}):
|
||||
# 4. Call the method under test with payload
|
||||
|
||||
Reference in New Issue
Block a user