Repository navigation
🧪 test(activation): make Windows cases portable - #3790
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
pydocassertion also compared the stored alias with the command xonsh expands throughcmd.exe.Git keeps the Python template in LF on every checkout. The xonsh tests pass paths as Python strings with
@(...)and check the storedpydocalias. The alias and Tcl/Tk cases check that activation changes the state before checking that deactivation or switching restores it. Xonsh argument syntaxRun from a Windows Git checkout with Python 3.10, tox, and xonsh installed and
xonshonPATH.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
After