`zcash --help` test improvements
Applying suggestions from @daira’s review of #6204. Co-authored-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
34ca70d7a9
commit
87aa33ecc4
|
@ -12,7 +12,6 @@ from test_framework.test_framework import BitcoinTestFramework
|
|||
from test_framework.util import assert_equal, assert_true, zcashd_binary
|
||||
import subprocess
|
||||
import tempfile
|
||||
import time
|
||||
|
||||
help_message = """
|
||||
In order to ensure you are adequately protecting your privacy when using Zcash,
|
||||
|
@ -489,9 +488,7 @@ class ShowHelpTest(BitcoinTestFramework):
|
|||
def show_help(self):
|
||||
with tempfile.SpooledTemporaryFile(max_size=2**16) as log_stdout:
|
||||
args = [ zcashd_binary(), "--help" ]
|
||||
process = subprocess.Popen(args, stdout=log_stdout)
|
||||
while process.poll() is None:
|
||||
time.sleep(0.25)
|
||||
process = subprocess.run(args, stdout=log_stdout)
|
||||
assert_equal(process.returncode, 0)
|
||||
log_stdout.seek(0)
|
||||
stdout = log_stdout.read().decode('utf-8')
|
||||
|
|
|
@ -443,7 +443,7 @@ def assert_start_raises_init_error(i, dirname, extra_args=None, expected_msg=Non
|
|||
if expected_msg is None:
|
||||
assert_msg = "%s should have exited with an error" % (zcashd_binary(),)
|
||||
else:
|
||||
assert_msg = "%s should have exited with expected error %s" % (zcashd_binary(), expected_msg)
|
||||
assert_msg = "%s should have exited with expected error %r" % (zcashd_binary(), expected_msg)
|
||||
raise AssertionError(assert_msg)
|
||||
|
||||
def start_nodes(num_nodes, dirname, extra_args=None, rpchost=None, binary=None):
|
||||
|
|
Loading…
Reference in New Issue