Skip to content

🧪 test(activation): make Windows cases portable - #3790

Merged
gaborbernat merged 1 commit into
pypa:mainfrom
gaborbernat:fix/windows-activation
Dec 5, 2026
Merged

gaborbernat merged 1 commit into
pypa:mainfrom
gaborbernat:fix/windows-activation

Conversation

@gaborbernat

Copy link
Copy Markdown
Contributor

Windows activation tests expected CRLF even when the Python template had LF. The xonsh cases passed Windows paths through shell quotes, where backslashes could change the path. The pydoc assertion also compared the stored alias with the command xonsh expands through cmd.exe.

Git keeps the Python template in LF on every checkout. The xonsh tests pass paths as Python strings with @(...) and check the stored pydoc alias. The alias and Tcl/Tk cases check that activation changes the state before checking that deactivation or switching restores it. Xonsh argument syntax

Run from a Windows Git checkout with Python 3.10, tox, and xonsh installed and xonsh on PATH.

PS> tox run -e 3.10 -x "env_run_base.commands=python -m pytest --int -n 4 --tb=no tests/unit/activation/test_python_activator.py::test_python tests/unit/activation/test_xonsh.py"

Before

================== 10 failed, 51 passed, 6 skipped in 15.97s ==================

After

======================= 61 passed, 6 skipped in 14.58s ========================

Windows activation tests depended on checkout line endings and on how
xonsh expanded quoted paths and aliases. Keep the Python template in
LF and exercise xonsh activation with literal paths and stored aliases.
@gaborbernat gaborbernat added the skip news No user-facing changelog entry required label Dec 5, 2026
@gaborbernat
gaborbernat marked this pull request as ready for review December 5, 2026 04:31
@gaborbernat
gaborbernat merged commit af4d58a into pypa:main Dec 5, 2026
76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news No user-facing changelog entry required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant