mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
scripted-diff: Specify Python major version explicitly on Windows
Using `py.exe` launcher might by fragile depending on how Python was installed. Specifying the Python version explicitly fixes test errors like this: ``` RunCommandParseJSON error: process(py C:\Users\hebasto\bitcoin\test\functional\mocks\signer.py enumerate) returned 9009: Python was not found... ``` -BEGIN VERIFY SCRIPT- sed -i 's|"py "|"py -3 "|g' $(git grep -l '"py "' -- test/functional) -END VERIFY SCRIPT-
This commit is contained in:
parent
7c66a4b610
commit
6a7686b446
2 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,7 @@ class RPCSignerTest(BitcoinTestFramework):
|
|||
def mock_signer_path(self):
|
||||
path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'mocks', 'signer.py')
|
||||
if platform.system() == "Windows":
|
||||
return "py " + path
|
||||
return "py -3 " + path
|
||||
else:
|
||||
return path
|
||||
|
||||
|
|
|
@ -25,21 +25,21 @@ class WalletSignerTest(BitcoinTestFramework):
|
|||
def mock_signer_path(self):
|
||||
path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'mocks', 'signer.py')
|
||||
if platform.system() == "Windows":
|
||||
return "py " + path
|
||||
return "py -3 " + path
|
||||
else:
|
||||
return path
|
||||
|
||||
def mock_invalid_signer_path(self):
|
||||
path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'mocks', 'invalid_signer.py')
|
||||
if platform.system() == "Windows":
|
||||
return "py " + path
|
||||
return "py -3 " + path
|
||||
else:
|
||||
return path
|
||||
|
||||
def mock_multi_signers_path(self):
|
||||
path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'mocks', 'multi_signers.py')
|
||||
if platform.system() == "Windows":
|
||||
return "py " + path
|
||||
return "py -3 " + path
|
||||
else:
|
||||
return path
|
||||
|
||||
|
|
Loading…
Reference in a new issue