D9286: tests: use python from environment in test-parseindex2.py
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Mon Nov 9 18:02:59 UTC 2020
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 <https://phab.mercurial-scm.org/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
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
To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list