This commit is contained in:
Hennadii Stepanov 2025-01-08 21:01:40 +03:00 committed by GitHub
commit 9231d44d45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 17 deletions

View file

@ -9,6 +9,7 @@ See also wallet_signer.py for tests that require wallet context.
"""
import os
import platform
import sys
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
@ -20,10 +21,7 @@ from test_framework.util import (
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

View file

@ -8,7 +8,7 @@ Verify that a bitcoind node can use an external signer command
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 @@ 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 -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