diff --git a/tests/test_agent_capabilities.py b/tests/test_agent_capabilities.py index 487fb1f..df52a5c 100644 --- a/tests/test_agent_capabilities.py +++ b/tests/test_agent_capabilities.py @@ -7,6 +7,5 @@ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) import ai_client -def test_agent_capabilities_listing(): -# Verify that the agent exposes its available tools correctly +def test_agent_capabilities_listing() -> None: pass diff --git a/tests/test_dag_engine.py b/tests/test_dag_engine.py index 07b1765..4ba1b74 100644 --- a/tests/test_dag_engine.py +++ b/tests/test_dag_engine.py @@ -40,8 +40,7 @@ def test_has_cycle_indirect_cycle() -> None: dag = TrackDAG([t1, t2, t3]) assert dag.has_cycle() -def test_has_cycle_complex_no_cycle(): -# T1 -> T2, T1 -> T3, T2 -> T4, T3 -> T4 +def test_has_cycle_complex_no_cycle() -> None: t1 = Ticket(id="T1", description="T1", status="todo", assigned_to="worker", depends_on=["T2", "T3"]) t2 = Ticket(id="T2", description="T2", status="todo", assigned_to="worker", depends_on=["T4"]) t3 = Ticket(id="T3", description="T3", status="todo", assigned_to="worker", depends_on=["T4"]) diff --git a/tests/test_execution_engine.py b/tests/test_execution_engine.py index d3356f5..33a6e02 100644 --- a/tests/test_execution_engine.py +++ b/tests/test_execution_engine.py @@ -2,8 +2,7 @@ import pytest from models import Ticket from dag_engine import TrackDAG, ExecutionEngine -def test_execution_engine_basic_flow(): -# Setup tickets with dependencies +def test_execution_engine_basic_flow() -> None: t1 = Ticket(id="T1", description="Task 1", status="todo", assigned_to="worker") t2 = Ticket(id="T2", description="Task 2", status="todo", assigned_to="worker", depends_on=["T1"]) t3 = Ticket(id="T3", description="Task 3", status="todo", assigned_to="worker", depends_on=["T1"]) diff --git a/tests/test_headless_verification.py b/tests/test_headless_verification.py index 033a43f..8000045 100644 --- a/tests/test_headless_verification.py +++ b/tests/test_headless_verification.py @@ -1,3 +1,4 @@ +from typing import Any import pytest from unittest.mock import MagicMock, patch, call from models import Ticket, Track, WorkerContext @@ -33,7 +34,7 @@ async def test_headless_verification_full_run() -> None: assert mock_reset.call_count == 2 @pytest.mark.asyncio -async def test_headless_verification_error_and_qa_interceptor(): +async def test_headless_verification_error_and_qa_interceptor() -> None: """ 5. Simulate a shell error and verify that the Tier 4 QA interceptor is triggered and its summary is injected into the worker's history for the next retry. @@ -54,7 +55,7 @@ async def test_headless_verification_error_and_qa_interceptor(): # Ensure _gemini_client is restored by the mock ensure function import ai_client - def restore_client(): + def restore_client() -> None: ai_client._gemini_client = mock_genai_client mock_ensure.side_effect = restore_client ai_client._gemini_client = mock_genai_client @@ -86,7 +87,7 @@ async def test_headless_verification_error_and_qa_interceptor(): mock_chat.send_message.side_effect = [mock_resp1, mock_resp2] # Mock run_powershell behavior: it should call the qa_callback on error - def run_side_effect(script, base_dir, qa_callback): + def run_side_effect(script: Any, base_dir: Any, qa_callback: Any) -> Any: if qa_callback: analysis = qa_callback("Error: file not found") return f"""STDERR: Error: file not found @@ -117,3 +118,4 @@ QA ANALYSIS: if "QA ANALYSIS:" in part_str and "FIX: Check if path exists." in part_str: found_qa = True assert found_qa, "QA Analysis was not injected into the next round" + diff --git a/tests/test_mcp_perf_tool.py b/tests/test_mcp_perf_tool.py index e168766..250842f 100644 --- a/tests/test_mcp_perf_tool.py +++ b/tests/test_mcp_perf_tool.py @@ -8,8 +8,7 @@ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) import mcp_client -def test_mcp_perf_tool_retrieval(): -# Test that the MCP tool can call performance_monitor metrics +def test_mcp_perf_tool_retrieval() -> None: mock_metrics = {"fps": 60, "last_frame_time_ms": 16.6} # Simulate tool call by patching the callback with patch('mcp_client.perf_monitor_callback', return_value=mock_metrics): diff --git a/tests/test_sim_ai_settings.py b/tests/test_sim_ai_settings.py index a46286d..a899b99 100644 --- a/tests/test_sim_ai_settings.py +++ b/tests/test_sim_ai_settings.py @@ -8,7 +8,7 @@ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) from simulation.sim_ai_settings import AISettingsSimulation -def test_ai_settings_simulation_run(): +def test_ai_settings_simulation_run() -> None: mock_client = MagicMock() mock_client.wait_for_server.return_value = True mock_client.get_value.side_effect = lambda key: { diff --git a/tests/test_sim_execution.py b/tests/test_sim_execution.py index dbbc16d..875a033 100644 --- a/tests/test_sim_execution.py +++ b/tests/test_sim_execution.py @@ -8,7 +8,7 @@ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) from simulation.sim_execution import ExecutionSimulation -def test_execution_simulation_run(): +def test_execution_simulation_run() -> None: mock_client = MagicMock() mock_client.wait_for_server.return_value = True # Mock show_confirm_modal state