From ee7cde10f8a9aa3da3a53bc9700c87075bd1b569 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 19:16:52 +0000 Subject: [PATCH] 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 <53631862+PR0M3TH3AN@users.noreply.github.com> --- src/tests/test_ai_tui_agent_harness.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/tests/test_ai_tui_agent_harness.py b/src/tests/test_ai_tui_agent_harness.py index ed228a38..cb990a47 100644 --- a/src/tests/test_ai_tui_agent_harness.py +++ b/src/tests/test_ai_tui_agent_harness.py @@ -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()