HomePhabricator

Move parse_args and set_test_params to __init__

Description

Move parse_args and set_test_params to init

Summary:

This ensures TestFramework default parameters are set before setup is called.
A child class will therefore have access to defaults when overriding setup.

In our codebase, this was already achieved by the change in D1974 which move d`set_test_params` into main() after parsing arguments. This commit makes our codebase more similar to Core, while keeping our ordering of method calls: parse_args before set_test_params.

This is a backport of Core PR17288 [5/7]

It is inspired by the following 2 commits while taking into account changes introduced in D1974:

Depends on D8244

Test Plan: ninja && ninja check

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8245

Details

Provenance
PiRKAuthored on Nov 3 2020, 09:06
PiRKPushed on Nov 3 2020, 14:39
Reviewer
Restricted Owners Package
Differential Revision
D8245: Move parse_args and set_test_params to __init__
Parents
rABCdf335a36010f: Clear TestNode objects after shutdown
Branches
Unknown
Tags
Unknown