ada9617308
Batch rename of 22 test files. 62 references renamed total. The full test suite is now GREEN again, matching the pre-rename baseline from Task 1.1. Pure mechanical rename. No behavior change. Files affected: test_ai_cache_tracking, test_ai_client_cli, test_ai_client_result, test_api_events, test_context_pruner, test_deepseek_provider, test_gemini_cli_* (3 files), test_gui2_mcp, test_headless_* (2 files), test_live_gui_integration_v2, test_orchestration_logic, test_phase6_engine, test_rag_integration, test_run_worker_lifecycle_abort, test_spawn_interception_v2, test_symbol_parsing, test_tier4_interceptor, test_tiered_aggregation, test_token_usage. Note: spec estimated 24 files; actual is 22 (test_deprecation_warnings no longer exists, and 1 fewer file than spec's list). Refs: conductor/tracks/send_result_to_send_20260616/
54 lines
1.6 KiB
Python
54 lines
1.6 KiB
Python
"""Apply the Phase 4 batch rename to all remaining test files."""
|
|
from __future__ import annotations
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
FILES = [
|
|
"tests/test_ai_cache_tracking.py",
|
|
"tests/test_ai_client_cli.py",
|
|
"tests/test_ai_client_result.py",
|
|
"tests/test_api_events.py",
|
|
"tests/test_context_pruner.py",
|
|
"tests/test_deepseek_provider.py",
|
|
"tests/test_gemini_cli_edge_cases.py",
|
|
"tests/test_gemini_cli_integration.py",
|
|
"tests/test_gemini_cli_parity_regression.py",
|
|
"tests/test_gui2_mcp.py",
|
|
"tests/test_headless_service.py",
|
|
"tests/test_headless_verification.py",
|
|
"tests/test_live_gui_integration_v2.py",
|
|
"tests/test_orchestration_logic.py",
|
|
"tests/test_phase6_engine.py",
|
|
"tests/test_rag_integration.py",
|
|
"tests/test_run_worker_lifecycle_abort.py",
|
|
"tests/test_spawn_interception_v2.py",
|
|
"tests/test_symbol_parsing.py",
|
|
"tests/test_tier4_interceptor.py",
|
|
"tests/test_tiered_aggregation.py",
|
|
"tests/test_token_usage.py",
|
|
]
|
|
|
|
|
|
def main() -> int:
|
|
total_before = 0
|
|
total_renamed = 0
|
|
for rel in FILES:
|
|
p = Path(rel)
|
|
with p.open("r", encoding="utf-8", newline="") as f:
|
|
content = f.read()
|
|
before = content.count("send_result")
|
|
new_content = content.replace("send_result", "send")
|
|
with p.open("w", encoding="utf-8", newline="") as f:
|
|
f.write(new_content)
|
|
remaining = new_content.count("send_result")
|
|
print(f"{rel}: {before} -> {before - remaining} (remaining={remaining})")
|
|
total_before += before
|
|
total_renamed += before - remaining
|
|
print(f"Total: renamed {total_renamed} of {total_before} occurrences")
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|