Fix Windows CI failure in AI TUI agent tests

- Skip `src/tests/test_ai_tui_agent_harness.py` on Windows to avoid `ImportError` due to missing `termios`/`pty` modules.
- Ensure the harness module is only loaded if the skip condition is not met.

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-27 19:16:52 +00:00
1 parent 3c4efc0626
commit ee7cde10f8
1 file changed
+18
+18
View File
@@ -18,6 +18,24 @@ def _load_harness_module():
return module
# Skip entire module on Windows or if termios/pty are missing
if sys.platform.startswith("win"):
pytest.skip(
"AI TUI agent harness tests require pty/termios (Unix-only)",
allow_module_level=True,
)
try:
import termios
import pty
import tty
except ImportError:
pytest.skip(
"AI TUI agent harness tests require pty/termios/tty modules",
allow_module_level=True,
)
# Only load the harness if we haven't skipped
harness = _load_harness_module()