test-filecache: use sys.executable to call python
authorMathias De Mare <mathias.de_mare@nokia.com>
Wed, 11 Nov 2020 22:01:45 +0100
changeset 45834 e01ea8325859
parent 45833 be6544a05e8f
child 45835 f38d592f871a
test-filecache: use sys.executable to call python As was mentioned in c102b704edb5, test scripts calling 'python' or 'python3' might use the wrong python. For test-filecache.py, this causes a failed test on CentOS 7. Differential Revision: https://phab.mercurial-scm.org/D9295
tests/test-filecache.py
--- a/tests/test-filecache.py	Tue Sep 01 11:03:47 2020 -0400
+++ b/tests/test-filecache.py	Wed Nov 11 22:01:45 2020 +0100
@@ -5,7 +5,7 @@
 import sys
 
 if subprocess.call(
-    ['python', '%s/hghave' % os.environ['TESTDIR'], 'cacheable']
+    [sys.executable, '%s/hghave' % os.environ['TESTDIR'], 'cacheable']
 ):
     sys.exit(80)