refactor(tests): Add strict type hints to fourth batch of test files

This commit is contained in:
2026-02-28 19:20:41 -05:00
parent e8513d563b
commit ee2d6f4234
9 changed files with 34 additions and 27 deletions

View File

@@ -1,9 +1,10 @@
from typing import Generator
import pytest
from unittest.mock import patch
from gui_2 import App
@pytest.fixture
def app_instance() -> None:
def app_instance() -> Generator[App, None, None]:
with (
patch('gui_2.load_config', return_value={'gui': {'show_windows': {}}}),
patch('gui_2.save_config'),
@@ -17,7 +18,7 @@ def app_instance() -> None:
):
yield App()
def test_gui2_hubs_exist_in_show_windows(app_instance):
def test_gui2_hubs_exist_in_show_windows(app_instance: App) -> None:
"""
Verifies that the new consolidated Hub windows are defined in the App's show_windows.
This ensures they will be available in the 'Windows' menu.
@@ -33,7 +34,7 @@ def test_gui2_hubs_exist_in_show_windows(app_instance):
for hub in expected_hubs:
assert hub in app_instance.show_windows, f"Expected hub window '{hub}' not found in show_windows"
def test_gui2_old_windows_removed_from_show_windows(app_instance):
def test_gui2_old_windows_removed_from_show_windows(app_instance: App) -> None:
"""
Verifies that the old fragmented windows are removed from show_windows.
"""