Files
manual_slop/add_waits.py

29 lines
989 B
Python

with open("tests/test_visual_orchestration.py", "r", encoding="utf-8", newline="") as f:
content = f.read()
# Add a wait and debug after setting provider
content = content.replace(
"""# Setup provider
client.set_value("current_provider", "gemini_cli")
client.set_value(
"gcli_path",
f'"{sys.executable}" "{os.path.abspath("tests/mock_gemini_cli.py")}"',
)
client.set_value("manual_approve", True)""",
"""# Setup provider
client.set_value("current_provider", "gemini_cli")
time.sleep(0.5) # Wait for provider to be set
client.set_value(
"gcli_path",
f'"{sys.executable}" "{os.path.abspath("tests/mock_gemini_cli.py")}"',
)
time.sleep(0.5) # Wait for gcli_path to be set
client.set_value("manual_approve", True)
time.sleep(0.5) # Wait for all settings""",
)
with open("tests/test_visual_orchestration.py", "w", encoding="utf-8", newline="") as f:
f.write(content)
print("Added waits to test")