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()