From patchwork Mon Nov 9 18:02:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D9286: tests: use python from environment in test-parseindex2.py From: phabricator X-Patchwork-Id: 47561 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Mon, 9 Nov 2020 18:02:59 +0000 martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Without this, the test starts failing with D9273 (the change to `pyexename` to be specific). REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9286 AFFECTED FILES tests/test-parseindex2.py CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/tests/test-parseindex2.py b/tests/test-parseindex2.py --- a/tests/test-parseindex2.py +++ b/tests/test-parseindex2.py @@ -5,6 +5,7 @@ from __future__ import absolute_import, print_function +import os import struct import subprocess import sys @@ -129,7 +130,7 @@ "import sys; sys.hexversion=%s; " "import mercurial.cext.parsers" % hexversion ) - cmd = "python -c \"%s\"" % code + cmd = "\"%s\" -c \"%s\"" % (os.environ['PYTHON'], code) # We need to do these tests inside a subprocess because parser.c's # version-checking code happens inside the module init function, and # when using reload() to reimport an extension module, "The init function