From patchwork Fri Jul 2 22:37:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D10941: run-tests: clarify pyexename assignement From: phabricator X-Patchwork-Id: 49255 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Fri, 2 Jul 2021 22:37:53 +0000 marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY That assignement is wrong, we clarify that it is wrong before starting to fix it. This will make the fix clearer. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10941 AFFECTED FILES tests/run-tests.py CHANGE DETAILS To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -3529,7 +3529,10 @@ def _usecorrectpython(self): """Configure the environment to use the appropriate Python in tests.""" # Tests must use the same interpreter as us or bad things will happen. - pyexename = sys.platform == 'win32' and b'python.exe' or b'python3' + if sys.platform == 'win32': + pyexename = b'python.exe' + else: + pyexename = b'python3' # XXX this is wrong with python2... # os.symlink() is a thing with py3 on Windows, but it requires # Administrator rights.