diff --git a/test/functional/rpc_signer.py b/test/functional/rpc_signer.py index 7dd16ea8fee14..715520b150731 100755 --- a/test/functional/rpc_signer.py +++ b/test/functional/rpc_signer.py @@ -9,6 +9,7 @@ """ import os import platform +import sys from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( @@ -20,10 +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 -3 " + path - else: - return path + return sys.executable + " " + path def set_test_params(self): self.num_nodes = 4 diff --git a/test/functional/wallet_signer.py b/test/functional/wallet_signer.py index 52b4c390b83fb..fe1c7953c23ff 100755 --- a/test/functional/wallet_signer.py +++ b/test/functional/wallet_signer.py @@ -8,7 +8,7 @@ See also rpc_signer.py for tests without wallet context. """ import os -import platform +import sys from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( @@ -24,24 +24,15 @@ def add_options(self, parser): 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 -3 " + path - else: - return path + return sys.executable + " " + 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 -3 " + path - else: - return path + return sys.executable + " " + 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 -3 " + path - else: - return path + return sys.executable + " " + path def set_test_params(self): self.num_nodes = 2