comparison tests/test-verify-repo-operations.py @ 47063:1d075b857c90 stable

tests: ensure `$PYTHON` is quoted for Windows Global installs of python3 go into "Program Files", and tons of tests fail with mysterious errors if this isn't quoted. Most of this is a followup to 0826d684a1b5, but a some of these were existing issues. Shebang lines are ignored because quoting breaks direct execution- these will need to be launched indirectly with the quoted `$PYTHON` command. Differential Revision: https://phab.mercurial-scm.org/D10633
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 01 May 2021 00:41:43 -0400
parents 0826d684a1b5
children 6000f5b25c9b
comparison
equal deleted inserted replaced
47062:f38bf44e077f 47063:1d075b857c90
352 return 352 return
353 with open(path, 'wb') as o: 353 with open(path, 'wb') as o:
354 o.write(content) 354 o.write(content)
355 self.log.append( 355 self.log.append(
356 ( 356 (
357 "$ $PYTHON -c 'import binascii; " 357 "$ \"$PYTHON\" -c 'import binascii; "
358 "print(binascii.unhexlify(\"%s\"))' > %s" 358 "print(binascii.unhexlify(\"%s\"))' > %s"
359 ) 359 )
360 % ( 360 % (
361 binascii.hexlify(content), 361 binascii.hexlify(content),
362 pipes.quote(path), 362 pipes.quote(path),