This is an archive of the discontinued Mercurial Phabricator instance.

tests: use venv on Python 3
ClosedPublic

Authored by indygreg on Nov 4 2019, 11:34 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Commits
rHG9bab6407c2c9: tests: use venv on Python 3
Summary

This test was failing in some Python 3 environments because
$PYTHON -m virtualenv was somehow resulting in Python 2
being used. Why, I'm not sure.

Python 3 includes virtualenv in the standard library as the
venv module.

This commit changes test-install.t to use $PYTHON -m venv on
Python 3 and $PYTHON -m virtualenv on Python 2 (if available).

I chose to make some test output duplicated because we can't
have nested conditionals and there is no easy way to express
ORing of hghave checks.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Nov 4 2019, 11:34 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.