fix(gui2): Correct Response panel rendering and fix automation crashes

This commit is contained in:
2026-02-24 21:56:26 -05:00
parent fb9ee27b38
commit 14984c5233
12 changed files with 103 additions and 64 deletions

View File

@@ -7,11 +7,11 @@ import importlib.util
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
# Load gui.py
spec = importlib.util.spec_from_file_location("gui", "gui.py")
gui = importlib.util.module_from_spec(spec)
sys.modules["gui"] = gui
spec.loader.exec_module(gui)
from gui import App
spec = importlib.util.spec_from_file_location("gui_legacy", "gui_legacy.py")
gui_legacy = importlib.util.module_from_spec(spec)
sys.modules["gui_legacy"] = gui_legacy
spec.loader.exec_module(gui_legacy)
from gui_legacy import App
def test_new_hubs_defined_in_window_info():
"""
@@ -22,7 +22,7 @@ def test_new_hubs_defined_in_window_info():
# as window_info is initialized in __init__ before DPG starts.
# But we mock load_config to avoid file access.
from unittest.mock import patch
with patch('gui.load_config', return_value={}):
with patch('gui_legacy.load_config', return_value={}):
app = App()
expected_hubs = {
@@ -59,8 +59,8 @@ def test_old_windows_removed_from_window_info(app_instance_simple):
@pytest.fixture
def app_instance_simple():
from unittest.mock import patch
from gui import App
with patch('gui.load_config', return_value={}):
from gui_legacy import App
with patch('gui_legacy.load_config', return_value={}):
app = App()
return app