AI-Colab / test_cli_timeout.py
A.Tuin
SPEC_2026_04_13
1f8efa1
Raw History Blame Contribute Delete
400 Bytes
import asyncio
from core.gemini_cli_executor import execute
async def test():
# Заведомо малый таймаут
resp = await execute(mode="console", message="x" * 5000, timeout=1)
assert "таймаут" in resp.lower() or "ошибка" in resp.lower(), f"Нет fallback: {resp}"
print("✅ TIMEOUT HANDLED: fallback returned safely")
return True
asyncio.run(test())