Skip to content

Commit e48fed1

Browse files
achow101vijaydasmp
authored andcommitted
Merge bitcoin#26480: test: Remove wallet option from non-wallet tests
fa10f19 test: Set default in add_wallet_options if only one type can be chosen (MacroFake) 555519d test: Remove wallet option from non-wallet tests (MacroFake) fac8d59 test: Set -disablewallet when no wallet has been compiled (MacroFake) fa68937 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 fa10f19 Tree-SHA512: a5784da7305f4ec58c0013f433289000d94fc3d434b00fc329ffa37b812e2cd1da0071e34c3462bf79d904808564f2ae6d3d582f6b86b26215f9b07391b58460
1 parent 527b826 commit e48fed1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

test/functional/feature_notifications.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def notify_outputname(walletname, txid):
2828
class NotificationsTest(DashTestFramework):
2929
def add_options(self, parser):
3030
self.add_wallet_options(parser)
31-
3231
def set_test_params(self):
3332
self.set_dash_test_params(6, 4)
3433

test/functional/wallet_fundrawtransaction.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def get_unspent(listunspent, amount):
3232
raise AssertionError('Could not find unspent with amount={}'.format(amount))
3333

3434
class RawTransactionsTest(BitcoinTestFramework):
35+
3536
def set_test_params(self):
3637
self.num_nodes = 4
3738
self.setup_clean_chain = True
@@ -46,6 +47,7 @@ def add_options(self, parser):
4647
self.add_wallet_options(parser)
4748
parser.add_argument("--nohd", dest="nohd", default=False, action="store_true",
4849
help="Test with -nohd enabled")
50+
self.add_wallet_options(parser)
4951

5052
def setup_network(self):
5153
self.setup_nodes()

0 commit comments

Comments
 (0)