test(ai_client): rename send_result to send in test_conductor_engine_v2
22 references renamed (mostly monkeypatch.setattr calls + comments). Test file state: GREEN. All 10 tests in this file now pass.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
"""Rename send_result -> send in a single test file (idempotent: only renames occurrences of send_result)."""
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def main() -> int:
|
||||
rel = sys.argv[1]
|
||||
p = Path(rel)
|
||||
with p.open("r", encoding="utf-8", newline="") as f:
|
||||
content = f.read()
|
||||
has_crlf = "\r\n" in content
|
||||
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")
|
||||
before = content.count("send_result")
|
||||
print(f"{rel}: renamed {before - remaining} occurrences; remaining={remaining}")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user