diff options
author | Andrew Chow <github@achow101.com> | 2022-11-28 10:58:46 -0500 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2022-11-28 11:16:49 -0500 |
commit | 8597260872bbef86524996ec695ffb30ec596416 (patch) | |
tree | 144b4f5d8fc32296b1f4bbf176b8411053bdb20a /test/functional/wallet_balance.py | |
parent | 5488dc1eb47783259ba8557c5aaca312c3de0634 (diff) | |
parent | fa10f193b54650b3071bc7ee2d90fcfe40a16dc9 (diff) | |
download | bitcoin-8597260872bbef86524996ec695ffb30ec596416.tar.xz |
Merge bitcoin/bitcoin#26480: test: Remove wallet option from non-wallet tests
fa10f193b54650b3071bc7ee2d90fcfe40a16dc9 test: Set default in add_wallet_options if only one type can be chosen (MacroFake)
555519d082fbe5e047595f06d7f301e441bb7149 test: Remove wallet option from non-wallet tests (MacroFake)
fac8d59d310fa94a8d5dd99659a76cd958d1fd1b test: Set -disablewallet when no wallet has been compiled (MacroFake)
fa68937b89aa5b10b33b3f5146390cd7ad369ff7 test: Make requires_wallet private (MacroFake)
Pull request description:
The tests have several issues:
* Some tests that are wallet-type specific offer the option to run the test with the incompatible type
For example, `wallet_dump.py` offers `--descriptors` and on current master fails with `JSONRPCException: Invalid public key`. After the changes here, it fails with a clear error: `unrecognized arguments: --descriptors`.
* Tests that don't use the wallet at all offer the option to run it with a wallet type. This is confusing and wastes developers time if they are "tricked" into running the test for both wallet types, even though no wallet code is executed at all.
For example, `feature_addrman.py` will happily accept and run with `--descriptors` or `--legacy-wallet`. After the changes here, it no longer silently ignores the flag, but reports a clear error: `unrecognized arguments`.
ACKs for top commit:
achow101:
ACK fa10f193b54650b3071bc7ee2d90fcfe40a16dc9
Tree-SHA512: a5784da7305f4ec58c0013f433289000d94fc3d434b00fc329ffa37b812e2cd1da0071e34c3462bf79d904808564f2ae6d3d582f6b86b26215f9b07391b58460
Diffstat (limited to 'test/functional/wallet_balance.py')
-rwxr-xr-x | test/functional/wallet_balance.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/functional/wallet_balance.py b/test/functional/wallet_balance.py index 60da22ca26..e8c09e4c1a 100755 --- a/test/functional/wallet_balance.py +++ b/test/functional/wallet_balance.py @@ -46,6 +46,9 @@ def create_transactions(node, address, amt, fees): return txs class WalletTest(BitcoinTestFramework): + def add_options(self, parser): + self.add_wallet_options(parser) + def set_test_params(self): self.num_nodes = 2 self.setup_clean_chain = True |