refactor(tests): Add strict type hints to third batch of test files
This commit is contained in:
@@ -4,9 +4,10 @@ import os
|
||||
import sys
|
||||
import requests
|
||||
import json
|
||||
from typing import Any
|
||||
from api_hook_client import ApiHookClient
|
||||
|
||||
def test_gemini_cli_context_bleed_prevention(live_gui):
|
||||
def test_gemini_cli_context_bleed_prevention(live_gui: Any) -> None:
|
||||
"""
|
||||
Test that the GeminiCliAdapter correctly filters out echoed 'user' messages
|
||||
and only shows assistant content in the GUI history.
|
||||
@@ -39,7 +40,7 @@ print(json.dumps({"type": "result", "stats": {"total_tokens": 10}}), flush=True)
|
||||
assert "echoing you" not in ai_entries[0].get("content")
|
||||
os.remove(bleed_mock)
|
||||
|
||||
def test_gemini_cli_parameter_resilience(live_gui):
|
||||
def test_gemini_cli_parameter_resilience(live_gui: Any) -> None:
|
||||
"""
|
||||
Test that mcp_client correctly handles 'file_path' and 'dir_path' aliases
|
||||
sent by the AI instead of 'path'.
|
||||
@@ -106,7 +107,7 @@ else:
|
||||
assert found, "Tool result indicating success not found in history"
|
||||
os.remove(alias_mock)
|
||||
|
||||
def test_gemini_cli_loop_termination(live_gui):
|
||||
def test_gemini_cli_loop_termination(live_gui: Any) -> None:
|
||||
"""
|
||||
Test that multi-round tool calling correctly terminates and preserves
|
||||
payload (session context) between rounds.
|
||||
|
||||
Reference in New Issue
Block a user