From fa68937b89aa5b10b33b3f5146390cd7ad369ff7 Mon Sep 17 00:00:00 2001 From: MacroFake <falke.marco@gmail.com> Date: Thu, 10 Nov 2022 10:12:39 +0100 Subject: test: Make requires_wallet private The bool is only used to call a public helper, which some tests already do. So use the public helper in all tests consistently and make the confusingly named bool private. --- test/functional/interface_bitcoin_cli.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/functional/interface_bitcoin_cli.py') diff --git a/test/functional/interface_bitcoin_cli.py b/test/functional/interface_bitcoin_cli.py index db5564ac50..e9a7d417a7 100755 --- a/test/functional/interface_bitcoin_cli.py +++ b/test/functional/interface_bitcoin_cli.py @@ -69,8 +69,6 @@ class TestBitcoinCli(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 - if self.is_specified_wallet_compiled(): - self.requires_wallet = True def skip_test_if_missing_module(self): self.skip_if_no_cli() @@ -114,6 +112,7 @@ class TestBitcoinCli(BitcoinTestFramework): self.log.info("Test -getinfo returns expected network and blockchain info") if self.is_specified_wallet_compiled(): + self.import_deterministic_coinbase_privkeys() self.nodes[0].encryptwallet(password) cli_get_info_string = self.nodes[0].cli('-getinfo').send_cli() cli_get_info = cli_get_info_string_to_dict(cli_get_info_string) -- cgit v1.2.3 From 555519d082fbe5e047595f06d7f301e441bb7149 Mon Sep 17 00:00:00 2001 From: MacroFake <falke.marco@gmail.com> Date: Wed, 9 Nov 2022 12:53:13 +0100 Subject: test: Remove wallet option from non-wallet tests Review note: The changes are complete, because self.options.descriptors is set to None in parse_args (test_framework.py). A value of None implies -disablewallet, see the previous commit. So if a call to add_wallet_options is missing, it will lead to a test failure when the wallet is compiled in. --- test/functional/interface_bitcoin_cli.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/functional/interface_bitcoin_cli.py') diff --git a/test/functional/interface_bitcoin_cli.py b/test/functional/interface_bitcoin_cli.py index e9a7d417a7..abd0a15e58 100755 --- a/test/functional/interface_bitcoin_cli.py +++ b/test/functional/interface_bitcoin_cli.py @@ -66,6 +66,9 @@ def cli_get_info_string_to_dict(cli_get_info_string): class TestBitcoinCli(BitcoinTestFramework): + def add_options(self, parser): + self.add_wallet_options(parser) + def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 -- cgit v1.2.3