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

This commit is contained in:
2026-02-28 19:24:02 -05:00
parent ee2d6f4234
commit cc806d2cc6
9 changed files with 20 additions and 21 deletions

View File

@@ -1,11 +1,12 @@
import pytest
from unittest.mock import MagicMock, patch
from typing import Generator
from gui_2 import App
import ai_client
from events import EventEmitter
@pytest.fixture
def app_instance() -> None:
def app_instance() -> Generator[type[App], None, None]:
"""
Fixture to create an instance of the gui_2.App class for testing.
It mocks functions that would render a window or block execution.
@@ -25,7 +26,7 @@ def app_instance() -> None:
):
yield App
def test_app_subscribes_to_events(app_instance):
def test_app_subscribes_to_events(app_instance: type[App]) -> None:
"""
This test checks that the App's __init__ method subscribes the necessary
event handlers to the ai_client.events emitter.