In bdd42ed8de8a92ae3e69e7b2dfceae7330f32676: I think it can be simplified. See:
0diff --git a/test/functional/wallet_migration.py b/test/functional/wallet_migration.py
1index 928ab4acb4..06bc4e1fbb 100755
2--- a/test/functional/wallet_migration.py
3+++ b/test/functional/wallet_migration.py
4@@ -1070,12 +1070,7 @@ class WalletMigrationTest(BitcoinTestFramework):
5 wpkh_desc = descsum_create(f'wpkh({pubkey_hex})')
6 expected_descs = [pk_desc, pkh_desc, sh_wpkh_desc, wpkh_desc]
7
8- migrated_desc = []
9- for desc_info in wo_wallet.listdescriptors()['descriptors']:
10- desc = desc_info['desc']
11- if pubkey.hex() in desc:
12- migrated_desc.append(desc)
13-
14+ migrated_desc = [item['desc'] for item in wo_wallet.listdescriptors()['descriptors']]
15 # Verify all expected descriptors were migrated
16 assert_equal(expected_descs, migrated_desc)
17 wallet.unloadwallet()
I don’t see why we need to check if pubkey is into the descriptors, we expect all of them to have it.