changeset 45848:e7a4c018b563

tests: use python from environment in test-parseindex2.py Without this, the test starts failing with D9273 (the change to `pyexename` to be specific). Differential Revision: https://phab.mercurial-scm.org/D9286
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 09 Nov 2020 09:58:44 -0800
parents e0dbfbd4062c
children c102b704edb5
files tests/test-parseindex2.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-parseindex2.py	Thu Oct 22 13:38:14 2020 -0700
+++ b/tests/test-parseindex2.py	Mon Nov 09 09:58:44 2020 -0800
@@ -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