refactor(tests): Add strict type hints to fifth batch of test files
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user