diff options
author | JamesC <james.chiangwu@gmail.com> | 2019-10-26 16:00:02 +0200 |
---|---|---|
committer | James Chiang <james.chiangwu@gmail.com> | 2019-11-03 20:34:41 +0100 |
commit | 2ab01462f48b2d4e0d03ba842c3af8851c67c6f1 (patch) | |
tree | ed591b8c62eac2b979cdb07b1dfdae0475983ca4 /test/functional/test_framework | |
parent | 614c645643e86c4255b98c663c10f2c227158d4b (diff) | |
download | bitcoin-2ab01462f48b2d4e0d03ba842c3af8851c67c6f1.tar.xz |
Move assert num_nodes is set into main()
This allows a BitcoinTestFramework child class to set test parameters in an
overridden setup() rather than in an overridden set_test_params().
Diffstat (limited to 'test/functional/test_framework')
-rwxr-xr-x | test/functional/test_framework/test_framework.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 6c18ef47ab..7375ab1fb7 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -100,11 +100,11 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): self.bind_to_localhost_only = True self.set_test_params() - assert hasattr(self, "num_nodes"), "Test must set self.num_nodes in set_test_params()" - 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: |