Windows: more CLI unit test gaps (pwd import, select.poll stdin watcher, unmocked Prompt.ask)
Follow-up to #8638. While fixing the Windows CLI test failures there, we found 3 more Windows-only test gaps. They are left out of that fix on purpose and tracked here.
1. tests/unit/browser_extension/ cannot be collected on Windows
tests/unit/browser_extension/home_guard.py (loaded by that directory's conftest.py) runs import pwd at module level. The pwd module does not exist on Windows, so every test in tests/unit/browser_extension/ fails at collection (e.g. test_mcp_glue.py).
Possible fix: guard the import, or skip the directory on win32.
2. run_commands.py stdin-EOF watcher uses select.poll (POSIX-only)
In skyvern/cli/run_commands.py, _start_stdin_eof_watcher uses select.poll() and select.POLLHUP. Neither exists on Windows. These tests fail in tests/unit/test_run_commands_cleanup.py:
test_stdin_eof_watcher_allows_native_clean_returntest_stdin_eof_watcher_force_exits_after_shared_profile_cleanup[deleted]test_stdin_eof_watcher_force_exits_after_shared_profile_cleanup[deferred]test_run_mcp_stdin_eof_invokes_original_loop_cleanup
This needs a design decision on how to detect stdin EOF on Windows, e.g. a reader thread or msvcrt. The alternative is to disable the watcher on win32 and skip the tests.
3. test_init_mcp.py::test_setup_mcp_local_claude_code_uses_local_stdio raises EOFError
The test does not mock a tool-scope rich.prompt.Prompt.ask, so the real input() runs and raises EOFError. This might not be Windows-only (it may depend on stdin/isatty behavior); not investigated further.
Source: Skyvern-AI/skyvern