HomePhabricator

[electrum] let unittest discover all test cases

Description

[electrum] let unittest discover all test cases

Summary:
This does not change the behavior of the test_runner.py script which was already discovering the tests.

It fixes running the test suites individually when the suite() function was not maintained, e.g.:

python -m electrumabc.tests.test_wallet

From the unitest.main doc:

The defaultTest argument is either the name of a single test or an iterable of test names to run if no test names are specified via argv. If not specified or None and no test names are provided via argv, all tests found in module are run.

Depends on D14442

Test Plan:

python test_runner.py
python -m electrumabc.tests.test_wallet
python -m electrumabc.tests.test_transaction

Check that all test cases are run (same number of tests before and after this change in the case of test_runner.py).

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
PiRKAuthored on Sep 1 2023, 14:24
PiRKPushed on Sep 4 2023, 05:20
Reviewer
Restricted Project
Differential Revision
D14443: [electrum] let unittest discover all test cases
Parents
rABCaab7dbb4e714: [electrum] fix sweep and add a test
Branches
Unknown
Tags
Unknown