gemini quota exhausted: fixing regressions in test suite
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import pytest
|
||||
from unittest.mock import patch, MagicMock
|
||||
from src.gui_2 import App
|
||||
from src import gui_2
|
||||
|
||||
def test_render_context_composition_panel_fast(app_instance: App):
|
||||
"""Verifies that the context composition panel rendering path executes without exceptions."""
|
||||
@@ -18,9 +19,9 @@ def test_render_context_composition_panel_fast(app_instance: App):
|
||||
mock_imscope.tab_item.return_value.__enter__.return_value = (True, True)
|
||||
|
||||
try:
|
||||
app_instance._render_context_composition_panel()
|
||||
gui_2.render_context_composition_panel(app_instance)
|
||||
except Exception as e:
|
||||
pytest.fail(f"_render_context_composition_panel raised an exception: {e}")
|
||||
pytest.fail(f"render_context_composition_panel raised an exception: {e}")
|
||||
|
||||
def test_render_discussion_panel_fast(app_instance: App):
|
||||
"""Verifies that the discussion panel rendering path executes without exceptions."""
|
||||
@@ -37,10 +38,15 @@ def test_render_discussion_panel_fast(app_instance: App):
|
||||
mock_imgui.ListClipper.return_value.step.return_value = False
|
||||
mock_imscope.tab_item.return_value.__enter__.return_value = (True, True)
|
||||
|
||||
# Mocks for complex imgui logic in render_discussion_tab
|
||||
mock_imgui.is_item_active.return_value = False
|
||||
mock_imgui.begin_tab_bar.return_value = False
|
||||
mock_imgui.begin_tab_item.return_value = (False, False)
|
||||
|
||||
try:
|
||||
app_instance._render_discussion_panel()
|
||||
gui_2.render_discussion_hub(app_instance)
|
||||
except Exception as e:
|
||||
pytest.fail(f"_render_discussion_panel raised an exception: {e}")
|
||||
pytest.fail(f"render_discussion_hub raised an exception: {e}")
|
||||
|
||||
def test_render_files_and_media_fast(app_instance: App):
|
||||
"""Verifies that the files and media panel rendering path executes without exceptions."""
|
||||
@@ -58,6 +64,6 @@ def test_render_files_and_media_fast(app_instance: App):
|
||||
mock_imscope.tab_item.return_value.__enter__.return_value = (True, True)
|
||||
|
||||
try:
|
||||
app_instance._render_files_and_media()
|
||||
gui_2.render_files_and_media(app_instance)
|
||||
except Exception as e:
|
||||
pytest.fail(f"_render_files_and_media raised an exception: {e}")
|
||||
pytest.fail(f"render_files_and_media raised an exception: {e}")
|
||||
Reference in New Issue
Block a user