Skip to content

Commit 2ab0146

Browse files
committed
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().
1 parent 614c645 commit 2ab0146

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/functional/test_framework/test_framework.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ def __init__(self):
100100
self.bind_to_localhost_only = True
101101
self.set_test_params()
102102

103-
assert hasattr(self, "num_nodes"), "Test must set self.num_nodes in set_test_params()"
104-
105103
def main(self):
106104
"""Main function. This should not be overridden by the subclass test scripts."""
107105

106+
assert hasattr(self, "num_nodes"), "Test must set self.num_nodes in set_test_params()"
107+
108108
self.parse_args()
109109

110110
try:

0 commit comments

Comments
 (0)