aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-08-03 14:57:45 +0100
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-08-03 14:57:45 +0100
commit6a7686b44618eabd2f8ee9f1d357cfeb1bce6d91 (patch)
tree2cdc3ecb8dfcb30f5ca24aa81174335879dc927b /test/functional
parent7c66a4b6109c01b79979128ef23e63fc733f89ba (diff)
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-
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/rpc_signer.py2
-rwxr-xr-xtest/functional/wallet_signer.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/rpc_signer.py b/test/functional/rpc_signer.py
index 5ba0d35835..488682e959 100755
--- a/test/functional/rpc_signer.py
+++ b/test/functional/rpc_signer.py
@@ -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
diff --git a/test/functional/wallet_signer.py b/test/functional/wallet_signer.py
index 3e7c613e55..2735ec1706 100755
--- a/test/functional/wallet_signer.py
+++ b/test/functional/wallet_signer.py
@@ -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