refactor(tests): Add strict type hints to second batch of test files
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
from typing import Any
|
||||
import sys
|
||||
import os
|
||||
import importlib.util
|
||||
@@ -40,7 +41,7 @@ def test_new_hubs_defined_in_window_info() -> None:
|
||||
assert l == label or label in l, f"Label mismatch for {tag}: expected {label}, found {l}"
|
||||
assert found, f"Expected window label {label} not found in window_info"
|
||||
|
||||
def test_old_windows_removed_from_window_info(app_instance_simple):
|
||||
def test_old_windows_removed_from_window_info(app_instance_simple: Any) -> None:
|
||||
"""
|
||||
Verifies that the old fragmented windows are removed from window_info.
|
||||
"""
|
||||
@@ -54,14 +55,14 @@ def test_old_windows_removed_from_window_info(app_instance_simple):
|
||||
assert tag not in app_instance_simple.window_info.values(), f"Old window tag {tag} should have been removed from window_info"
|
||||
|
||||
@pytest.fixture
|
||||
def app_instance_simple():
|
||||
def app_instance_simple() -> Any:
|
||||
from unittest.mock import patch
|
||||
from gui_legacy import App
|
||||
with patch('gui_legacy.load_config', return_value={}):
|
||||
app = App()
|
||||
return app
|
||||
|
||||
def test_hub_windows_have_correct_flags(app_instance_simple):
|
||||
def test_hub_windows_have_correct_flags(app_instance_simple: Any) -> None:
|
||||
"""
|
||||
Verifies that the new Hub windows have appropriate flags for a professional workspace.
|
||||
(e.g., no_collapse should be True for main hubs).
|
||||
@@ -80,7 +81,7 @@ def test_hub_windows_have_correct_flags(app_instance_simple):
|
||||
# but we can check if it's been configured if we mock dpg.window or check it manually
|
||||
dpg.destroy_context()
|
||||
|
||||
def test_indicators_exist(app_instance_simple):
|
||||
def test_indicators_exist(app_instance_simple: Any) -> None:
|
||||
"""
|
||||
Verifies that the new thinking and live indicators exist in the UI.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user