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.
This commit is contained in:
parent
2ab01462f4
commit
5155602a63
1 changed files with 1 additions and 2 deletions
|
@ -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…
Reference in a new issue