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 patch, MagicMock
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[App, None, None]:
if not hasattr(ai_client, 'events') or ai_client.events is None:
ai_client.events = EventEmitter()
with (
@@ -21,7 +22,7 @@ def app_instance() -> None:
):
yield App()
def test_mcp_tool_call_is_dispatched(app_instance):
def test_mcp_tool_call_is_dispatched(app_instance: App) -> None:
"""
This test verifies that when the AI returns a tool call for an MCP function,
the ai_client correctly dispatches it to mcp_client.