Skip to content

Commit f5cdc29

Browse files
author
MarcoFalke
committed
Merge #20316: test: Fix wallet_multiwallet test issue on Windows
fa00ff0 test: Fix wallet_multiwallet test issue on Windows (MarcoFalke) Pull request description: Fixes: ``` Traceback (most recent call last): File "test\functional\test_framework\test_framework.py", line 126, in main self.run_test() File "test/functional/wallet_multiwallet.py", line 120, in run_test assert_equal(sorted(map(lambda w: w['name'], self.nodes[0].listwalletdir()['wallets'])), sorted(in_wallet_dir)) File "test\functional\test_framework\util.py", line 49, in assert_equal raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args)) AssertionError: not(['', 'sub\\w5', 'w', 'w1', 'w2', 'w3', 'w7', 'w7_symlink', 'w8'] == ['', 'sub/w5', 'w', 'w1', 'w2', 'w3', 'w7', 'w7_symlink', 'w8']) ACKs for top commit: promag: ACK fa00ff0. Tree-SHA512: 7a809a352677a216465cef59e866e4881272e302e897cebf7d9645bf87aebeaf54435bb0692bb5c1381c2dd680e8a34e640ea18ca6e2a4087e3233cd9c24ed04
2 parents 9bb0783 + fa00ff0 commit f5cdc29

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/functional/wallet_multiwallet.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ def wallet_file(name):
104104
# w8 - to verify existing wallet file is loaded correctly. Not tested for SQLite wallets as this is a deprecated BDB behavior.
105105
# '' - to verify default wallet file is created correctly
106106
to_create = ['w1', 'w2', 'w3', 'w', 'sub/w5', 'w7_symlink']
107-
in_wallet_dir = to_create.copy() # Wallets in the wallet dir
108-
in_wallet_dir.append('w7') # w7 is not loaded or created, but will be listed by listwalletdir because w7_symlink
109-
to_create.append(os.path.join(self.options.tmpdir, 'extern/w6')) # External, not in the wallet dir, so we need to avoid adding it to in_wallet_dir
107+
in_wallet_dir = [w.replace('/', os.path.sep) for w in to_create] # Wallets in the wallet dir
108+
in_wallet_dir.append('w7') # w7 is not loaded or created, but will be listed by listwalletdir because w7_symlink
109+
to_create.append(os.path.join(self.options.tmpdir, 'extern/w6')) # External, not in the wallet dir, so we need to avoid adding it to in_wallet_dir
110110
to_load = [self.default_wallet_name]
111111
if not self.options.descriptors:
112112
to_load.append('w8')
113-
wallet_names = to_create + to_load # Wallet names loaded in the wallet
114-
in_wallet_dir += to_load # The loaded wallets are also in the wallet dir
113+
wallet_names = to_create + to_load # Wallet names loaded in the wallet
114+
in_wallet_dir += to_load # The loaded wallets are also in the wallet dir
115115
self.start_node(0)
116116
for wallet_name in to_create:
117117
self.nodes[0].createwallet(wallet_name)
@@ -298,7 +298,6 @@ def wallet_file(name):
298298
# Fail to load if one wallet is a copy of another, test this twice to make sure that we don't re-introduce #14304
299299
assert_raises_rpc_error(-4, "BerkeleyDatabase: Can't open database w8_copy (duplicates fileid", self.nodes[0].loadwallet, 'w8_copy')
300300

301-
302301
# Fail to load if wallet file is a symlink
303302
assert_raises_rpc_error(-4, "Wallet file verification failed. Invalid -wallet path 'w8_symlink'", self.nodes[0].loadwallet, 'w8_symlink')
304303

@@ -397,5 +396,6 @@ def wallet_file(name):
397396
self.nodes[0].unloadwallet(wallet)
398397
self.nodes[1].loadwallet(wallet)
399398

399+
400400
if __name__ == '__main__':
401401
MultiWalletTest().main()

0 commit comments

Comments
 (0)