Skip to content

Windows: several CLI unit tests fail (env_paths HOME lookup, MCP threading assertion, rich console cp1252 encoding) #8638

Open

Description

@KrishP147

Found while working on #7077/#8576/#4220 — these failures are pre-existing on `main` on Windows, unrelated to those changes (confirmed by stashing the changes and re-running against clean `main`).

Running the CLI test suite on Windows (`pytest tests/unit/` and related), a handful of tests fail:

  1. `env_paths` HOME lookup picks up the real `~/.skyvern/.env` instead of the test's patched `HOME`. Tests like those in `test_cli_auth.py` / `test_quickstart_command.py` that patch `HOME` to a temp dir expect `env_paths`/config lookup to respect it, but on Windows it appears to fall back to (or additionally read) the real user home directory instead of honoring the patched env var — likely a Windows-specific home-directory resolution path (e.g. `USERPROFILE` vs `HOME`, or `pathlib.Path.home()` behavior) that isn't covered by the same monkeypatch that works on POSIX.
  2. Threading assertion failure in an MCP-serving test (`test_run_mcp_serves...`) — looks like Windows-specific flakiness around thread timing/lifecycle, not a logic bug.
  3. A `rich`-console encoding error under cp1252. Windows terminals default to the `cp1252` codepage rather than UTF-8, and `rich`'s console output hits an encoding error when writing certain characters (likely emoji/box-drawing/unicode symbols in CLI output) under that codepage.

Environment

  • Windows 11, Git Bash / PowerShell
  • Reproduced via `pytest` locally; happens on `main` without any of the above PRs applied.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions