MCPcopy Create free account
hub / github.com/ElementsProject/elements / run_test

Method run_test

test/functional/feature_help.py:37–58  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

35 return out, err
36
37 def run_test(self):
38 self.log.info("Start bitcoin with -h for help text")
39 self.nodes[0].start(extra_args=['-h'])
40 # Node should exit immediately and output help to stdout.
41 output, _ = self.get_node_output(ret_code_expected=0)
42 assert b'Options' in output
43 self.log.info(f"Help text received: {output[0:60]} (...)")
44
45 self.log.info("Start bitcoin with -version for version information")
46 self.nodes[0].start(extra_args=['-version'])
47 # Node should exit immediately and output version to stdout.
48 output, _ = self.get_node_output(ret_code_expected=0)
49 assert b'version' in output
50 self.log.info(f"Version text received: {output[0:60]} (...)")
51
52 # Test that arguments not in the help results in an error
53 self.log.info("Start bitcoind with -fakearg to make sure it does not start")
54 self.nodes[0].start(extra_args=['-fakearg'])
55 # Node should exit immediately and output an error to stderr
56 _, output = self.get_node_output(ret_code_expected=1)
57 assert b'Error parsing command line arguments' in output
58 self.log.info(f"Error message received: {output[0:60]} (...)")
59
60
61if __name__ == '__main__':

Callers

nothing calls this directly

Calls 3

get_node_outputMethod · 0.95
infoMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected