Move argparse() to init()

This ensures TestFramework default parameters are set before setup is called. A
 child class will therefore have access to defaults when overriding setup.
pull/764/head
JamesC 5 years ago committed by James Chiang
parent 2ab01462f4
commit 5155602a63

@ -99,14 +99,13 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
self.supports_cli = False
self.bind_to_localhost_only = True
self.set_test_params()
self.parse_args()
def main(self):
"""Main function. This should not be overridden by the subclass test scripts."""
assert hasattr(self, "num_nodes"), "Test must set self.num_nodes in set_test_params()"
self.parse_args()
try:
self.setup()
self.run_test()

Loading…
Cancel
Save