Mercurial > public > mercurial-scm > hg
comparison tests/test-verify-repo-operations.py @ 46226:0826d684a1b5
test: replace a many occurence of `python` with `$PYTHON`
Otherwise this can use the wrong python version, or worse, not find any python
at all.
Differential Revision: https://phab.mercurial-scm.org/D9730
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 12 Jan 2021 22:43:55 +0100 |
parents | 89a2afe31e82 |
children | 1d075b857c90 |
comparison
equal
deleted
inserted
replaced
46225:88dfe1c279bb | 46226:0826d684a1b5 |
---|---|
9 import os | 9 import os |
10 import subprocess | 10 import subprocess |
11 import sys | 11 import sys |
12 | 12 |
13 # Only run if slow tests are allowed | 13 # Only run if slow tests are allowed |
14 if subprocess.call(['python', '%s/hghave' % os.environ['TESTDIR'], 'slow']): | 14 if subprocess.call( |
15 [os.environ['PYTHON'], '%s/hghave' % os.environ['TESTDIR'], 'slow'] | |
16 ): | |
15 sys.exit(80) | 17 sys.exit(80) |
16 | 18 |
17 # These tests require Hypothesis and pytz to be installed. | 19 # These tests require Hypothesis and pytz to be installed. |
18 # Running 'pip install hypothesis pytz' will achieve that. | 20 # Running 'pip install hypothesis pytz' will achieve that. |
19 # Note: This won't work if you're running Python < 2.7. | 21 # Note: This won't work if you're running Python < 2.7. |
350 return | 352 return |
351 with open(path, 'wb') as o: | 353 with open(path, 'wb') as o: |
352 o.write(content) | 354 o.write(content) |
353 self.log.append( | 355 self.log.append( |
354 ( | 356 ( |
355 "$ python -c 'import binascii; " | 357 "$ $PYTHON -c 'import binascii; " |
356 "print(binascii.unhexlify(\"%s\"))' > %s" | 358 "print(binascii.unhexlify(\"%s\"))' > %s" |
357 ) | 359 ) |
358 % ( | 360 % ( |
359 binascii.hexlify(content), | 361 binascii.hexlify(content), |
360 pipes.quote(path), | 362 pipes.quote(path), |