From a0473442d1c22043f5a288bd9255c006fd85d947 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 16 Jul 2024 22:05:14 +0100 Subject: [PATCH 1/3] scripted-diff: Add `__file__` argument to `BitcoinTestFramework.init()` -BEGIN VERIFY SCRIPT- sed -i -e 's/\s*().main\s*()/(__file__).main()/' $(git ls-files test/functional/*.py) sed -i -e 's/def __init__(self)/def __init__(self, test_file)/' test/functional/test_framework/test_framework.py -END VERIFY SCRIPT- --- test/functional/create_cache.py | 2 +- test/functional/example_test.py | 2 +- test/functional/feature_abortnode.py | 2 +- test/functional/feature_addrman.py | 2 +- test/functional/feature_anchors.py | 2 +- test/functional/feature_asmap.py | 2 +- test/functional/feature_assumeutxo.py | 2 +- test/functional/feature_assumevalid.py | 2 +- test/functional/feature_bind_extra.py | 2 +- test/functional/feature_bind_port_discover.py | 2 +- test/functional/feature_bind_port_externalip.py | 2 +- test/functional/feature_bip68_sequence.py | 2 +- test/functional/feature_block.py | 2 +- test/functional/feature_blocksdir.py | 2 +- test/functional/feature_cltv.py | 2 +- test/functional/feature_coinstatsindex.py | 2 +- test/functional/feature_config_args.py | 2 +- test/functional/feature_csv_activation.py | 2 +- test/functional/feature_dbcrash.py | 2 +- test/functional/feature_dersig.py | 2 +- test/functional/feature_dirsymlinks.py | 2 +- test/functional/feature_discover.py | 2 +- test/functional/feature_fastprune.py | 2 +- test/functional/feature_fee_estimation.py | 2 +- test/functional/feature_filelock.py | 2 +- test/functional/feature_framework_miniwallet.py | 2 +- test/functional/feature_help.py | 2 +- test/functional/feature_includeconf.py | 2 +- test/functional/feature_index_prune.py | 2 +- test/functional/feature_init.py | 2 +- test/functional/feature_loadblock.py | 2 +- test/functional/feature_logging.py | 2 +- test/functional/feature_maxtipage.py | 2 +- test/functional/feature_maxuploadtarget.py | 2 +- test/functional/feature_minchainwork.py | 2 +- test/functional/feature_notifications.py | 2 +- test/functional/feature_nulldummy.py | 2 +- test/functional/feature_posix_fs_permissions.py | 2 +- test/functional/feature_presegwit_node_upgrade.py | 2 +- test/functional/feature_proxy.py | 2 +- test/functional/feature_pruning.py | 2 +- test/functional/feature_rbf.py | 2 +- test/functional/feature_reindex.py | 2 +- test/functional/feature_reindex_readonly.py | 2 +- test/functional/feature_remove_pruned_files_on_startup.py | 2 +- test/functional/feature_segwit.py | 2 +- test/functional/feature_settings.py | 2 +- test/functional/feature_shutdown.py | 2 +- test/functional/feature_signet.py | 2 +- test/functional/feature_startupnotify.py | 2 +- test/functional/feature_taproot.py | 2 +- test/functional/feature_uacomment.py | 2 +- test/functional/feature_unsupported_utxo_db.py | 2 +- test/functional/feature_utxo_set_hash.py | 2 +- test/functional/feature_versionbits_warning.py | 2 +- test/functional/interface_bitcoin_cli.py | 2 +- test/functional/interface_http.py | 2 +- test/functional/interface_rest.py | 2 +- test/functional/interface_rpc.py | 2 +- test/functional/interface_usdt_coinselection.py | 2 +- test/functional/interface_usdt_mempool.py | 2 +- test/functional/interface_usdt_net.py | 2 +- test/functional/interface_usdt_utxocache.py | 2 +- test/functional/interface_usdt_validation.py | 2 +- test/functional/interface_zmq.py | 2 +- test/functional/mempool_accept.py | 2 +- test/functional/mempool_accept_wtxid.py | 2 +- test/functional/mempool_compatibility.py | 2 +- test/functional/mempool_datacarrier.py | 2 +- test/functional/mempool_dust.py | 2 +- test/functional/mempool_expiry.py | 2 +- test/functional/mempool_limit.py | 2 +- test/functional/mempool_package_limits.py | 2 +- test/functional/mempool_package_onemore.py | 2 +- test/functional/mempool_package_rbf.py | 2 +- test/functional/mempool_packages.py | 2 +- test/functional/mempool_persist.py | 2 +- test/functional/mempool_reorg.py | 2 +- test/functional/mempool_resurrect.py | 2 +- test/functional/mempool_sigoplimit.py | 2 +- test/functional/mempool_spend_coinbase.py | 2 +- test/functional/mempool_truc.py | 2 +- test/functional/mempool_unbroadcast.py | 2 +- test/functional/mempool_updatefromblock.py | 2 +- test/functional/mining_basic.py | 2 +- test/functional/mining_getblocktemplate_longpoll.py | 2 +- test/functional/mining_prioritisetransaction.py | 2 +- test/functional/p2p_1p1c_network.py | 2 +- test/functional/p2p_add_connections.py | 2 +- test/functional/p2p_addr_relay.py | 2 +- test/functional/p2p_addrfetch.py | 2 +- test/functional/p2p_addrv2_relay.py | 2 +- test/functional/p2p_block_sync.py | 2 +- test/functional/p2p_blockfilters.py | 2 +- test/functional/p2p_blocksonly.py | 2 +- test/functional/p2p_compactblocks.py | 2 +- test/functional/p2p_compactblocks_blocksonly.py | 2 +- test/functional/p2p_compactblocks_hb.py | 2 +- test/functional/p2p_disconnect_ban.py | 2 +- test/functional/p2p_dns_seeds.py | 2 +- test/functional/p2p_dos_header_tree.py | 2 +- test/functional/p2p_eviction.py | 2 +- test/functional/p2p_feefilter.py | 2 +- test/functional/p2p_filter.py | 2 +- test/functional/p2p_fingerprint.py | 2 +- test/functional/p2p_getaddr_caching.py | 2 +- test/functional/p2p_getdata.py | 2 +- test/functional/p2p_handshake.py | 2 +- test/functional/p2p_headers_sync_with_minchainwork.py | 2 +- test/functional/p2p_i2p_ports.py | 2 +- test/functional/p2p_i2p_sessions.py | 2 +- test/functional/p2p_ibd_stalling.py | 2 +- test/functional/p2p_ibd_txrelay.py | 2 +- test/functional/p2p_initial_headers_sync.py | 2 +- test/functional/p2p_invalid_block.py | 2 +- test/functional/p2p_invalid_locator.py | 2 +- test/functional/p2p_invalid_messages.py | 2 +- test/functional/p2p_invalid_tx.py | 2 +- test/functional/p2p_leak.py | 2 +- test/functional/p2p_leak_tx.py | 2 +- test/functional/p2p_message_capture.py | 2 +- test/functional/p2p_mutated_blocks.py | 2 +- test/functional/p2p_net_deadlock.py | 2 +- test/functional/p2p_nobloomfilter_messages.py | 2 +- test/functional/p2p_node_network_limited.py | 2 +- test/functional/p2p_opportunistic_1p1c.py | 2 +- test/functional/p2p_orphan_handling.py | 2 +- test/functional/p2p_outbound_eviction.py | 2 +- test/functional/p2p_permissions.py | 2 +- test/functional/p2p_ping.py | 2 +- test/functional/p2p_segwit.py | 2 +- test/functional/p2p_sendheaders.py | 2 +- test/functional/p2p_sendtxrcncl.py | 2 +- test/functional/p2p_timeouts.py | 2 +- test/functional/p2p_tx_download.py | 2 +- test/functional/p2p_tx_privacy.py | 2 +- test/functional/p2p_unrequested_blocks.py | 2 +- test/functional/p2p_v2_encrypted.py | 2 +- test/functional/p2p_v2_misbehaving.py | 2 +- test/functional/p2p_v2_transport.py | 2 +- test/functional/rpc_bind.py | 2 +- test/functional/rpc_blockchain.py | 2 +- test/functional/rpc_createmultisig.py | 2 +- test/functional/rpc_decodescript.py | 2 +- test/functional/rpc_deprecated.py | 2 +- test/functional/rpc_deriveaddresses.py | 2 +- test/functional/rpc_dumptxoutset.py | 2 +- test/functional/rpc_estimatefee.py | 2 +- test/functional/rpc_generate.py | 2 +- test/functional/rpc_getblockfilter.py | 2 +- test/functional/rpc_getblockfrompeer.py | 2 +- test/functional/rpc_getblockstats.py | 2 +- test/functional/rpc_getchaintips.py | 2 +- test/functional/rpc_getdescriptorinfo.py | 2 +- test/functional/rpc_help.py | 2 +- test/functional/rpc_invalid_address_message.py | 2 +- test/functional/rpc_invalidateblock.py | 2 +- test/functional/rpc_mempool_info.py | 2 +- test/functional/rpc_misc.py | 2 +- test/functional/rpc_named_arguments.py | 2 +- test/functional/rpc_net.py | 2 +- test/functional/rpc_packages.py | 2 +- test/functional/rpc_preciousblock.py | 2 +- test/functional/rpc_psbt.py | 2 +- test/functional/rpc_rawtransaction.py | 2 +- test/functional/rpc_scanblocks.py | 2 +- test/functional/rpc_scantxoutset.py | 2 +- test/functional/rpc_setban.py | 2 +- test/functional/rpc_signer.py | 2 +- test/functional/rpc_signmessagewithprivkey.py | 2 +- test/functional/rpc_signrawtransactionwithkey.py | 2 +- test/functional/rpc_txoutproof.py | 2 +- test/functional/rpc_uptime.py | 2 +- test/functional/rpc_users.py | 2 +- test/functional/rpc_validateaddress.py | 2 +- test/functional/rpc_whitelist.py | 2 +- test/functional/test_framework/test_framework.py | 2 +- test/functional/tool_signet_miner.py | 2 +- test/functional/tool_wallet.py | 2 +- test/functional/wallet_abandonconflict.py | 2 +- test/functional/wallet_address_types.py | 2 +- test/functional/wallet_assumeutxo.py | 2 +- test/functional/wallet_avoid_mixing_output_types.py | 2 +- test/functional/wallet_avoidreuse.py | 2 +- test/functional/wallet_backup.py | 2 +- test/functional/wallet_backwards_compatibility.py | 2 +- test/functional/wallet_balance.py | 2 +- test/functional/wallet_basic.py | 2 +- test/functional/wallet_blank.py | 2 +- test/functional/wallet_bumpfee.py | 2 +- test/functional/wallet_change_address.py | 2 +- test/functional/wallet_coinbase_category.py | 2 +- test/functional/wallet_conflicts.py | 2 +- test/functional/wallet_create_tx.py | 2 +- test/functional/wallet_createwallet.py | 2 +- test/functional/wallet_createwalletdescriptor.py | 2 +- test/functional/wallet_crosschain.py | 2 +- test/functional/wallet_descriptor.py | 2 +- test/functional/wallet_disable.py | 2 +- test/functional/wallet_dump.py | 2 +- test/functional/wallet_encryption.py | 2 +- test/functional/wallet_fallbackfee.py | 2 +- test/functional/wallet_fast_rescan.py | 2 +- test/functional/wallet_fundrawtransaction.py | 2 +- test/functional/wallet_gethdkeys.py | 2 +- test/functional/wallet_groups.py | 2 +- test/functional/wallet_hd.py | 2 +- test/functional/wallet_implicitsegwit.py | 2 +- test/functional/wallet_import_rescan.py | 2 +- test/functional/wallet_import_with_label.py | 2 +- test/functional/wallet_importdescriptors.py | 2 +- test/functional/wallet_importmulti.py | 2 +- test/functional/wallet_importprunedfunds.py | 2 +- test/functional/wallet_inactive_hdchains.py | 2 +- test/functional/wallet_keypool.py | 2 +- test/functional/wallet_keypool_topup.py | 2 +- test/functional/wallet_labels.py | 2 +- test/functional/wallet_listdescriptors.py | 2 +- test/functional/wallet_listreceivedby.py | 2 +- test/functional/wallet_listsinceblock.py | 2 +- test/functional/wallet_listtransactions.py | 2 +- test/functional/wallet_migration.py | 2 +- test/functional/wallet_miniscript.py | 2 +- test/functional/wallet_multisig_descriptor_psbt.py | 2 +- test/functional/wallet_multiwallet.py | 2 +- test/functional/wallet_orphanedreward.py | 2 +- test/functional/wallet_pruning.py | 2 +- test/functional/wallet_reindex.py | 2 +- test/functional/wallet_reorgsrestore.py | 2 +- test/functional/wallet_rescan_unconfirmed.py | 2 +- test/functional/wallet_resendwallettransactions.py | 2 +- test/functional/wallet_send.py | 2 +- test/functional/wallet_sendall.py | 2 +- test/functional/wallet_sendmany.py | 2 +- test/functional/wallet_signer.py | 2 +- test/functional/wallet_signmessagewithaddress.py | 2 +- test/functional/wallet_signrawtransactionwithwallet.py | 2 +- test/functional/wallet_simulaterawtx.py | 2 +- test/functional/wallet_spend_unconfirmed.py | 2 +- test/functional/wallet_startup.py | 2 +- test/functional/wallet_taproot.py | 2 +- test/functional/wallet_timelock.py | 2 +- test/functional/wallet_transactiontime_rescan.py | 2 +- test/functional/wallet_txn_clone.py | 2 +- test/functional/wallet_txn_doublespend.py | 2 +- test/functional/wallet_upgradewallet.py | 2 +- test/functional/wallet_watchonly.py | 2 +- 247 files changed, 247 insertions(+), 247 deletions(-) diff --git a/test/functional/create_cache.py b/test/functional/create_cache.py index 1108a8e3544..0702ea76665 100755 --- a/test/functional/create_cache.py +++ b/test/functional/create_cache.py @@ -24,4 +24,4 @@ class CreateCache(BitcoinTestFramework): pass if __name__ == '__main__': - CreateCache().main() + CreateCache(__file__).main() diff --git a/test/functional/example_test.py b/test/functional/example_test.py index 7f7aa065adc..39cea2962ff 100755 --- a/test/functional/example_test.py +++ b/test/functional/example_test.py @@ -225,4 +225,4 @@ class ExampleTest(BitcoinTestFramework): if __name__ == '__main__': - ExampleTest().main() + ExampleTest(__file__).main() diff --git a/test/functional/feature_abortnode.py b/test/functional/feature_abortnode.py index 01ba2834c42..a5c8aa163aa 100755 --- a/test/functional/feature_abortnode.py +++ b/test/functional/feature_abortnode.py @@ -42,4 +42,4 @@ class AbortNodeTest(BitcoinTestFramework): if __name__ == '__main__': - AbortNodeTest().main() + AbortNodeTest(__file__).main() diff --git a/test/functional/feature_addrman.py b/test/functional/feature_addrman.py index 2efad709008..c4e60fba123 100755 --- a/test/functional/feature_addrman.py +++ b/test/functional/feature_addrman.py @@ -160,4 +160,4 @@ class AddrmanTest(BitcoinTestFramework): if __name__ == "__main__": - AddrmanTest().main() + AddrmanTest(__file__).main() diff --git a/test/functional/feature_anchors.py b/test/functional/feature_anchors.py index 5d68f50f582..5ca46c13664 100755 --- a/test/functional/feature_anchors.py +++ b/test/functional/feature_anchors.py @@ -141,4 +141,4 @@ class AnchorsTest(BitcoinTestFramework): if __name__ == "__main__": - AnchorsTest().main() + AnchorsTest(__file__).main() diff --git a/test/functional/feature_asmap.py b/test/functional/feature_asmap.py index e469deef49d..cbff028bcc3 100755 --- a/test/functional/feature_asmap.py +++ b/test/functional/feature_asmap.py @@ -146,4 +146,4 @@ class AsmapTest(BitcoinTestFramework): if __name__ == '__main__': - AsmapTest().main() + AsmapTest(__file__).main() diff --git a/test/functional/feature_assumeutxo.py b/test/functional/feature_assumeutxo.py index 688e2866b27..f4d7c47d138 100755 --- a/test/functional/feature_assumeutxo.py +++ b/test/functional/feature_assumeutxo.py @@ -555,4 +555,4 @@ class Block: chain_tx: int if __name__ == '__main__': - AssumeutxoTest().main() + AssumeutxoTest(__file__).main() diff --git a/test/functional/feature_assumevalid.py b/test/functional/feature_assumevalid.py index 982fa799151..03a9f666b2a 100755 --- a/test/functional/feature_assumevalid.py +++ b/test/functional/feature_assumevalid.py @@ -172,4 +172,4 @@ class AssumeValidTest(BitcoinTestFramework): if __name__ == '__main__': - AssumeValidTest().main() + AssumeValidTest(__file__).main() diff --git a/test/functional/feature_bind_extra.py b/test/functional/feature_bind_extra.py index ed2328b76f7..6b53de188f4 100755 --- a/test/functional/feature_bind_extra.py +++ b/test/functional/feature_bind_extra.py @@ -88,4 +88,4 @@ class BindExtraTest(BitcoinTestFramework): assert_equal(binds, set(expected_services)) if __name__ == '__main__': - BindExtraTest().main() + BindExtraTest(__file__).main() diff --git a/test/functional/feature_bind_port_discover.py b/test/functional/feature_bind_port_discover.py index 6e07f2f16c8..568c88bcbea 100755 --- a/test/functional/feature_bind_port_discover.py +++ b/test/functional/feature_bind_port_discover.py @@ -75,4 +75,4 @@ class BindPortDiscoverTest(BitcoinTestFramework): assert found_addr1 if __name__ == '__main__': - BindPortDiscoverTest().main() + BindPortDiscoverTest(__file__).main() diff --git a/test/functional/feature_bind_port_externalip.py b/test/functional/feature_bind_port_externalip.py index 6a74ce5738a..8e2ac02470a 100755 --- a/test/functional/feature_bind_port_externalip.py +++ b/test/functional/feature_bind_port_externalip.py @@ -72,4 +72,4 @@ class BindPortExternalIPTest(BitcoinTestFramework): assert found if __name__ == '__main__': - BindPortExternalIPTest().main() + BindPortExternalIPTest(__file__).main() diff --git a/test/functional/feature_bip68_sequence.py b/test/functional/feature_bip68_sequence.py index 14b92d6733a..2d61987e944 100755 --- a/test/functional/feature_bip68_sequence.py +++ b/test/functional/feature_bip68_sequence.py @@ -412,4 +412,4 @@ class BIP68Test(BitcoinTestFramework): if __name__ == '__main__': - BIP68Test().main() + BIP68Test(__file__).main() diff --git a/test/functional/feature_block.py b/test/functional/feature_block.py index 932f37a0838..172af278482 100755 --- a/test/functional/feature_block.py +++ b/test/functional/feature_block.py @@ -1434,4 +1434,4 @@ class FullBlockTest(BitcoinTestFramework): if __name__ == '__main__': - FullBlockTest().main() + FullBlockTest(__file__).main() diff --git a/test/functional/feature_blocksdir.py b/test/functional/feature_blocksdir.py index 1a60c13c2c8..4a436328557 100755 --- a/test/functional/feature_blocksdir.py +++ b/test/functional/feature_blocksdir.py @@ -35,4 +35,4 @@ class BlocksdirTest(BitcoinTestFramework): if __name__ == '__main__': - BlocksdirTest().main() + BlocksdirTest(__file__).main() diff --git a/test/functional/feature_cltv.py b/test/functional/feature_cltv.py index fb3f6622719..dc01f8fa8f0 100755 --- a/test/functional/feature_cltv.py +++ b/test/functional/feature_cltv.py @@ -195,4 +195,4 @@ class BIP65Test(BitcoinTestFramework): if __name__ == '__main__': - BIP65Test().main() + BIP65Test(__file__).main() diff --git a/test/functional/feature_coinstatsindex.py b/test/functional/feature_coinstatsindex.py index 691163d0532..b4392e6002e 100755 --- a/test/functional/feature_coinstatsindex.py +++ b/test/functional/feature_coinstatsindex.py @@ -324,4 +324,4 @@ class CoinStatsIndexTest(BitcoinTestFramework): if __name__ == '__main__': - CoinStatsIndexTest().main() + CoinStatsIndexTest(__file__).main() diff --git a/test/functional/feature_config_args.py b/test/functional/feature_config_args.py index 9e13a3deefa..dc812d224fc 100755 --- a/test/functional/feature_config_args.py +++ b/test/functional/feature_config_args.py @@ -431,4 +431,4 @@ class ConfArgsTest(BitcoinTestFramework): if __name__ == '__main__': - ConfArgsTest().main() + ConfArgsTest(__file__).main() diff --git a/test/functional/feature_csv_activation.py b/test/functional/feature_csv_activation.py index 2db96829315..df02bcc6ad8 100755 --- a/test/functional/feature_csv_activation.py +++ b/test/functional/feature_csv_activation.py @@ -482,4 +482,4 @@ class BIP68_112_113Test(BitcoinTestFramework): if __name__ == '__main__': - BIP68_112_113Test().main() + BIP68_112_113Test(__file__).main() diff --git a/test/functional/feature_dbcrash.py b/test/functional/feature_dbcrash.py index afd0246209f..f1aa3961e33 100755 --- a/test/functional/feature_dbcrash.py +++ b/test/functional/feature_dbcrash.py @@ -286,4 +286,4 @@ class ChainstateWriteCrashTest(BitcoinTestFramework): if __name__ == "__main__": - ChainstateWriteCrashTest().main() + ChainstateWriteCrashTest(__file__).main() diff --git a/test/functional/feature_dersig.py b/test/functional/feature_dersig.py index 035e7151cad..48b0b745c60 100755 --- a/test/functional/feature_dersig.py +++ b/test/functional/feature_dersig.py @@ -148,4 +148,4 @@ class BIP66Test(BitcoinTestFramework): if __name__ == '__main__': - BIP66Test().main() + BIP66Test(__file__).main() diff --git a/test/functional/feature_dirsymlinks.py b/test/functional/feature_dirsymlinks.py index 96f4aed08a0..9fed99cbe58 100755 --- a/test/functional/feature_dirsymlinks.py +++ b/test/functional/feature_dirsymlinks.py @@ -38,4 +38,4 @@ class SymlinkTest(BitcoinTestFramework): if __name__ == "__main__": - SymlinkTest().main() + SymlinkTest(__file__).main() diff --git a/test/functional/feature_discover.py b/test/functional/feature_discover.py index 7f4b81114ed..9eaaea3652e 100755 --- a/test/functional/feature_discover.py +++ b/test/functional/feature_discover.py @@ -72,4 +72,4 @@ class DiscoverTest(BitcoinTestFramework): if __name__ == '__main__': - DiscoverTest().main() + DiscoverTest(__file__).main() diff --git a/test/functional/feature_fastprune.py b/test/functional/feature_fastprune.py index c913c4f93af..ca6877b9019 100755 --- a/test/functional/feature_fastprune.py +++ b/test/functional/feature_fastprune.py @@ -26,4 +26,4 @@ class FeatureFastpruneTest(BitcoinTestFramework): if __name__ == '__main__': - FeatureFastpruneTest().main() + FeatureFastpruneTest(__file__).main() diff --git a/test/functional/feature_fee_estimation.py b/test/functional/feature_fee_estimation.py index ffc87f8b8ba..34fb3c55737 100755 --- a/test/functional/feature_fee_estimation.py +++ b/test/functional/feature_fee_estimation.py @@ -439,4 +439,4 @@ class EstimateFeeTest(BitcoinTestFramework): if __name__ == "__main__": - EstimateFeeTest().main() + EstimateFeeTest(__file__).main() diff --git a/test/functional/feature_filelock.py b/test/functional/feature_filelock.py index 567207915e8..e71871114d3 100755 --- a/test/functional/feature_filelock.py +++ b/test/functional/feature_filelock.py @@ -54,4 +54,4 @@ class FilelockTest(BitcoinTestFramework): check_wallet_filelock(True) if __name__ == '__main__': - FilelockTest().main() + FilelockTest(__file__).main() diff --git a/test/functional/feature_framework_miniwallet.py b/test/functional/feature_framework_miniwallet.py index f1082890183..1f381df236e 100755 --- a/test/functional/feature_framework_miniwallet.py +++ b/test/functional/feature_framework_miniwallet.py @@ -46,4 +46,4 @@ class FeatureFrameworkMiniWalletTest(BitcoinTestFramework): if __name__ == '__main__': - FeatureFrameworkMiniWalletTest().main() + FeatureFrameworkMiniWalletTest(__file__).main() diff --git a/test/functional/feature_help.py b/test/functional/feature_help.py index 4b66030b47b..6d8a742d89f 100755 --- a/test/functional/feature_help.py +++ b/test/functional/feature_help.py @@ -59,4 +59,4 @@ class HelpTest(BitcoinTestFramework): if __name__ == '__main__': - HelpTest().main() + HelpTest(__file__).main() diff --git a/test/functional/feature_includeconf.py b/test/functional/feature_includeconf.py index 58ab063e71e..ee484e7ec50 100755 --- a/test/functional/feature_includeconf.py +++ b/test/functional/feature_includeconf.py @@ -83,4 +83,4 @@ class IncludeConfTest(BitcoinTestFramework): assert subversion.endswith("main; relative; relative2)/") if __name__ == '__main__': - IncludeConfTest().main() + IncludeConfTest(__file__).main() diff --git a/test/functional/feature_index_prune.py b/test/functional/feature_index_prune.py index 66c0a4f615f..030bf51ed86 100755 --- a/test/functional/feature_index_prune.py +++ b/test/functional/feature_index_prune.py @@ -155,4 +155,4 @@ class FeatureIndexPruneTest(BitcoinTestFramework): if __name__ == '__main__': - FeatureIndexPruneTest().main() + FeatureIndexPruneTest(__file__).main() diff --git a/test/functional/feature_init.py b/test/functional/feature_init.py index 22ae0c307b7..659d33684e5 100755 --- a/test/functional/feature_init.py +++ b/test/functional/feature_init.py @@ -149,4 +149,4 @@ class InitStressTest(BitcoinTestFramework): if __name__ == '__main__': - InitStressTest().main() + InitStressTest(__file__).main() diff --git a/test/functional/feature_loadblock.py b/test/functional/feature_loadblock.py index 5129e0d3287..1519c132b98 100755 --- a/test/functional/feature_loadblock.py +++ b/test/functional/feature_loadblock.py @@ -80,4 +80,4 @@ class LoadblockTest(BitcoinTestFramework): if __name__ == '__main__': - LoadblockTest().main() + LoadblockTest(__file__).main() diff --git a/test/functional/feature_logging.py b/test/functional/feature_logging.py index 0e9aca358d9..ab817fd12d2 100755 --- a/test/functional/feature_logging.py +++ b/test/functional/feature_logging.py @@ -101,4 +101,4 @@ class LoggingTest(BitcoinTestFramework): if __name__ == '__main__': - LoggingTest().main() + LoggingTest(__file__).main() diff --git a/test/functional/feature_maxtipage.py b/test/functional/feature_maxtipage.py index a1774a53953..4ce9bb949c3 100755 --- a/test/functional/feature_maxtipage.py +++ b/test/functional/feature_maxtipage.py @@ -62,4 +62,4 @@ class MaxTipAgeTest(BitcoinTestFramework): if __name__ == '__main__': - MaxTipAgeTest().main() + MaxTipAgeTest(__file__).main() diff --git a/test/functional/feature_maxuploadtarget.py b/test/functional/feature_maxuploadtarget.py index 39cff7b7382..136cdd024d5 100755 --- a/test/functional/feature_maxuploadtarget.py +++ b/test/functional/feature_maxuploadtarget.py @@ -206,4 +206,4 @@ class MaxUploadTest(BitcoinTestFramework): self.nodes[0].assert_start_raises_init_error(extra_args=["-maxuploadtarget=abc"], expected_msg="Error: Unable to parse -maxuploadtarget: 'abc'") if __name__ == '__main__': - MaxUploadTest().main() + MaxUploadTest(__file__).main() diff --git a/test/functional/feature_minchainwork.py b/test/functional/feature_minchainwork.py index 078d2ef63c9..8327a0477b3 100755 --- a/test/functional/feature_minchainwork.py +++ b/test/functional/feature_minchainwork.py @@ -115,4 +115,4 @@ class MinimumChainWorkTest(BitcoinTestFramework): if __name__ == '__main__': - MinimumChainWorkTest().main() + MinimumChainWorkTest(__file__).main() diff --git a/test/functional/feature_notifications.py b/test/functional/feature_notifications.py index d2b5315d31f..79e8df4b5e2 100755 --- a/test/functional/feature_notifications.py +++ b/test/functional/feature_notifications.py @@ -194,4 +194,4 @@ class NotificationsTest(BitcoinTestFramework): if __name__ == '__main__': - NotificationsTest().main() + NotificationsTest(__file__).main() diff --git a/test/functional/feature_nulldummy.py b/test/functional/feature_nulldummy.py index f896cb6f433..a53f78c13d8 100755 --- a/test/functional/feature_nulldummy.py +++ b/test/functional/feature_nulldummy.py @@ -154,4 +154,4 @@ class NULLDUMMYTest(BitcoinTestFramework): if __name__ == '__main__': - NULLDUMMYTest().main() + NULLDUMMYTest(__file__).main() diff --git a/test/functional/feature_posix_fs_permissions.py b/test/functional/feature_posix_fs_permissions.py index 40528779e6e..28b18038913 100755 --- a/test/functional/feature_posix_fs_permissions.py +++ b/test/functional/feature_posix_fs_permissions.py @@ -40,4 +40,4 @@ class PosixFsPermissionsTest(BitcoinTestFramework): if __name__ == '__main__': - PosixFsPermissionsTest().main() + PosixFsPermissionsTest(__file__).main() diff --git a/test/functional/feature_presegwit_node_upgrade.py b/test/functional/feature_presegwit_node_upgrade.py index 3d762c81977..8c1bd900837 100755 --- a/test/functional/feature_presegwit_node_upgrade.py +++ b/test/functional/feature_presegwit_node_upgrade.py @@ -54,4 +54,4 @@ class SegwitUpgradeTest(BitcoinTestFramework): if __name__ == '__main__': - SegwitUpgradeTest().main() + SegwitUpgradeTest(__file__).main() diff --git a/test/functional/feature_proxy.py b/test/functional/feature_proxy.py index 7a6f639021c..2201821fda3 100755 --- a/test/functional/feature_proxy.py +++ b/test/functional/feature_proxy.py @@ -457,4 +457,4 @@ class ProxyTest(BitcoinTestFramework): os.unlink(socket_path) if __name__ == '__main__': - ProxyTest().main() + ProxyTest(__file__).main() diff --git a/test/functional/feature_pruning.py b/test/functional/feature_pruning.py index 5f99b8dee8c..8d924282cfc 100755 --- a/test/functional/feature_pruning.py +++ b/test/functional/feature_pruning.py @@ -513,4 +513,4 @@ class PruneTest(BitcoinTestFramework): assert_equal(pruneheight, new_pruneheight) if __name__ == '__main__': - PruneTest().main() + PruneTest(__file__).main() diff --git a/test/functional/feature_rbf.py b/test/functional/feature_rbf.py index 739b9b9bb95..cd5f5734c96 100755 --- a/test/functional/feature_rbf.py +++ b/test/functional/feature_rbf.py @@ -727,4 +727,4 @@ class ReplaceByFeeTest(BitcoinTestFramework): assert conflicting_tx['txid'] in self.nodes[0].getrawmempool() if __name__ == '__main__': - ReplaceByFeeTest().main() + ReplaceByFeeTest(__file__).main() diff --git a/test/functional/feature_reindex.py b/test/functional/feature_reindex.py index 835cd0c5cfd..50a9ae1c060 100755 --- a/test/functional/feature_reindex.py +++ b/test/functional/feature_reindex.py @@ -103,4 +103,4 @@ class ReindexTest(BitcoinTestFramework): if __name__ == '__main__': - ReindexTest().main() + ReindexTest(__file__).main() diff --git a/test/functional/feature_reindex_readonly.py b/test/functional/feature_reindex_readonly.py index 52c0bb26a60..858a67566f9 100755 --- a/test/functional/feature_reindex_readonly.py +++ b/test/functional/feature_reindex_readonly.py @@ -87,4 +87,4 @@ class BlockstoreReindexTest(BitcoinTestFramework): if __name__ == '__main__': - BlockstoreReindexTest().main() + BlockstoreReindexTest(__file__).main() diff --git a/test/functional/feature_remove_pruned_files_on_startup.py b/test/functional/feature_remove_pruned_files_on_startup.py index 4ee653142ac..2e689f29203 100755 --- a/test/functional/feature_remove_pruned_files_on_startup.py +++ b/test/functional/feature_remove_pruned_files_on_startup.py @@ -52,4 +52,4 @@ class FeatureRemovePrunedFilesOnStartupTest(BitcoinTestFramework): assert not os.path.exists(rev1) if __name__ == '__main__': - FeatureRemovePrunedFilesOnStartupTest().main() + FeatureRemovePrunedFilesOnStartupTest(__file__).main() diff --git a/test/functional/feature_segwit.py b/test/functional/feature_segwit.py index 4dc19222c4b..f98f326e8f4 100755 --- a/test/functional/feature_segwit.py +++ b/test/functional/feature_segwit.py @@ -657,4 +657,4 @@ class SegWitTest(BitcoinTestFramework): if __name__ == '__main__': - SegWitTest().main() + SegWitTest(__file__).main() diff --git a/test/functional/feature_settings.py b/test/functional/feature_settings.py index 1cd0aeabd32..2189eac7dde 100755 --- a/test/functional/feature_settings.py +++ b/test/functional/feature_settings.py @@ -88,4 +88,4 @@ class SettingsTest(BitcoinTestFramework): if __name__ == '__main__': - SettingsTest().main() + SettingsTest(__file__).main() diff --git a/test/functional/feature_shutdown.py b/test/functional/feature_shutdown.py index 291df4c518a..a7277be39da 100755 --- a/test/functional/feature_shutdown.py +++ b/test/functional/feature_shutdown.py @@ -32,4 +32,4 @@ class ShutdownTest(BitcoinTestFramework): self.stop_node(0, wait=1000) if __name__ == '__main__': - ShutdownTest().main() + ShutdownTest(__file__).main() diff --git a/test/functional/feature_signet.py b/test/functional/feature_signet.py index a90a2a8e5e9..b648266caeb 100755 --- a/test/functional/feature_signet.py +++ b/test/functional/feature_signet.py @@ -82,4 +82,4 @@ class SignetBasicTest(BitcoinTestFramework): if __name__ == '__main__': - SignetBasicTest().main() + SignetBasicTest(__file__).main() diff --git a/test/functional/feature_startupnotify.py b/test/functional/feature_startupnotify.py index a8e62c6244d..1e071037254 100755 --- a/test/functional/feature_startupnotify.py +++ b/test/functional/feature_startupnotify.py @@ -39,4 +39,4 @@ class StartupNotifyTest(BitcoinTestFramework): if __name__ == '__main__': - StartupNotifyTest().main() + StartupNotifyTest(__file__).main() diff --git a/test/functional/feature_taproot.py b/test/functional/feature_taproot.py index 1a0844d2408..b2e030adc7d 100755 --- a/test/functional/feature_taproot.py +++ b/test/functional/feature_taproot.py @@ -1766,4 +1766,4 @@ class TaprootTest(BitcoinTestFramework): if __name__ == '__main__': - TaprootTest().main() + TaprootTest(__file__).main() diff --git a/test/functional/feature_uacomment.py b/test/functional/feature_uacomment.py index 4720f6dea39..fc372f543d6 100755 --- a/test/functional/feature_uacomment.py +++ b/test/functional/feature_uacomment.py @@ -37,4 +37,4 @@ class UacommentTest(BitcoinTestFramework): if __name__ == '__main__': - UacommentTest().main() + UacommentTest(__file__).main() diff --git a/test/functional/feature_unsupported_utxo_db.py b/test/functional/feature_unsupported_utxo_db.py index 6acf5512165..694a8e0623e 100755 --- a/test/functional/feature_unsupported_utxo_db.py +++ b/test/functional/feature_unsupported_utxo_db.py @@ -58,4 +58,4 @@ class UnsupportedUtxoDbTest(BitcoinTestFramework): if __name__ == "__main__": - UnsupportedUtxoDbTest().main() + UnsupportedUtxoDbTest(__file__).main() diff --git a/test/functional/feature_utxo_set_hash.py b/test/functional/feature_utxo_set_hash.py index 0bdcc6d83d5..3ab779b87dc 100755 --- a/test/functional/feature_utxo_set_hash.py +++ b/test/functional/feature_utxo_set_hash.py @@ -75,4 +75,4 @@ class UTXOSetHashTest(BitcoinTestFramework): if __name__ == '__main__': - UTXOSetHashTest().main() + UTXOSetHashTest(__file__).main() diff --git a/test/functional/feature_versionbits_warning.py b/test/functional/feature_versionbits_warning.py index 2c330eb6817..dc25ce6c836 100755 --- a/test/functional/feature_versionbits_warning.py +++ b/test/functional/feature_versionbits_warning.py @@ -100,4 +100,4 @@ class VersionBitsWarningTest(BitcoinTestFramework): self.wait_until(lambda: self.versionbits_in_alert_file()) if __name__ == '__main__': - VersionBitsWarningTest().main() + VersionBitsWarningTest(__file__).main() diff --git a/test/functional/interface_bitcoin_cli.py b/test/functional/interface_bitcoin_cli.py index a6628dcbf3f..e7113f8335d 100755 --- a/test/functional/interface_bitcoin_cli.py +++ b/test/functional/interface_bitcoin_cli.py @@ -383,4 +383,4 @@ class TestBitcoinCli(BitcoinTestFramework): if __name__ == '__main__': - TestBitcoinCli().main() + TestBitcoinCli(__file__).main() diff --git a/test/functional/interface_http.py b/test/functional/interface_http.py index 6e32009e051..dbdceb52d15 100755 --- a/test/functional/interface_http.py +++ b/test/functional/interface_http.py @@ -106,4 +106,4 @@ class HTTPBasicsTest (BitcoinTestFramework): if __name__ == '__main__': - HTTPBasicsTest ().main () + HTTPBasicsTest(__file__).main() diff --git a/test/functional/interface_rest.py b/test/functional/interface_rest.py index ae8d6b226db..5706b1427b3 100755 --- a/test/functional/interface_rest.py +++ b/test/functional/interface_rest.py @@ -436,4 +436,4 @@ class RESTTest (BitcoinTestFramework): assert_equal(resp.read().decode('utf-8').rstrip(), f"Invalid hash: {INVALID_PARAM}") if __name__ == '__main__': - RESTTest().main() + RESTTest(__file__).main() diff --git a/test/functional/interface_rpc.py b/test/functional/interface_rpc.py index 6c1855c4004..9074f0a2d9e 100755 --- a/test/functional/interface_rpc.py +++ b/test/functional/interface_rpc.py @@ -246,4 +246,4 @@ class RPCInterfaceTest(BitcoinTestFramework): if __name__ == '__main__': - RPCInterfaceTest().main() + RPCInterfaceTest(__file__).main() diff --git a/test/functional/interface_usdt_coinselection.py b/test/functional/interface_usdt_coinselection.py index 30931a41cd2..dc40986a75d 100755 --- a/test/functional/interface_usdt_coinselection.py +++ b/test/functional/interface_usdt_coinselection.py @@ -231,4 +231,4 @@ class CoinSelectionTracepointTest(BitcoinTestFramework): if __name__ == '__main__': - CoinSelectionTracepointTest().main() + CoinSelectionTracepointTest(__file__).main() diff --git a/test/functional/interface_usdt_mempool.py b/test/functional/interface_usdt_mempool.py index 0168d9f916a..a0882786656 100755 --- a/test/functional/interface_usdt_mempool.py +++ b/test/functional/interface_usdt_mempool.py @@ -322,4 +322,4 @@ class MempoolTracepointTest(BitcoinTestFramework): if __name__ == "__main__": - MempoolTracepointTest().main() + MempoolTracepointTest(__file__).main() diff --git a/test/functional/interface_usdt_net.py b/test/functional/interface_usdt_net.py index 5d7c8c23041..7b55259b63a 100755 --- a/test/functional/interface_usdt_net.py +++ b/test/functional/interface_usdt_net.py @@ -168,4 +168,4 @@ class NetTracepointTest(BitcoinTestFramework): if __name__ == '__main__': - NetTracepointTest().main() + NetTracepointTest(__file__).main() diff --git a/test/functional/interface_usdt_utxocache.py b/test/functional/interface_usdt_utxocache.py index 06cdcd10a04..ad98a3a1628 100755 --- a/test/functional/interface_usdt_utxocache.py +++ b/test/functional/interface_usdt_utxocache.py @@ -407,4 +407,4 @@ class UTXOCacheTracepointTest(BitcoinTestFramework): if __name__ == '__main__': - UTXOCacheTracepointTest().main() + UTXOCacheTracepointTest(__file__).main() diff --git a/test/functional/interface_usdt_validation.py b/test/functional/interface_usdt_validation.py index 30982393d85..9a37b96ada8 100755 --- a/test/functional/interface_usdt_validation.py +++ b/test/functional/interface_usdt_validation.py @@ -131,4 +131,4 @@ class ValidationTracepointTest(BitcoinTestFramework): if __name__ == '__main__': - ValidationTracepointTest().main() + ValidationTracepointTest(__file__).main() diff --git a/test/functional/interface_zmq.py b/test/functional/interface_zmq.py index 9f6f8919de8..b960f40ccc7 100755 --- a/test/functional/interface_zmq.py +++ b/test/functional/interface_zmq.py @@ -597,4 +597,4 @@ class ZMQTest (BitcoinTestFramework): if __name__ == '__main__': - ZMQTest().main() + ZMQTest(__file__).main() diff --git a/test/functional/mempool_accept.py b/test/functional/mempool_accept.py index e1cee46839c..2b841f3791e 100755 --- a/test/functional/mempool_accept.py +++ b/test/functional/mempool_accept.py @@ -409,4 +409,4 @@ class MempoolAcceptanceTest(BitcoinTestFramework): ) if __name__ == '__main__': - MempoolAcceptanceTest().main() + MempoolAcceptanceTest(__file__).main() diff --git a/test/functional/mempool_accept_wtxid.py b/test/functional/mempool_accept_wtxid.py index 4767d6db22c..e00e7b1ae4b 100755 --- a/test/functional/mempool_accept_wtxid.py +++ b/test/functional/mempool_accept_wtxid.py @@ -125,4 +125,4 @@ class MempoolWtxidTest(BitcoinTestFramework): assert_equal(node.getmempoolinfo()["unbroadcastcount"], 0) if __name__ == '__main__': - MempoolWtxidTest().main() + MempoolWtxidTest(__file__).main() diff --git a/test/functional/mempool_compatibility.py b/test/functional/mempool_compatibility.py index a126f164aab..7c72aaae773 100755 --- a/test/functional/mempool_compatibility.py +++ b/test/functional/mempool_compatibility.py @@ -78,4 +78,4 @@ class MempoolCompatibilityTest(BitcoinTestFramework): if __name__ == "__main__": - MempoolCompatibilityTest().main() + MempoolCompatibilityTest(__file__).main() diff --git a/test/functional/mempool_datacarrier.py b/test/functional/mempool_datacarrier.py index 2e27aa988ea..ed6ad8461a1 100755 --- a/test/functional/mempool_datacarrier.py +++ b/test/functional/mempool_datacarrier.py @@ -88,4 +88,4 @@ class DataCarrierTest(BitcoinTestFramework): if __name__ == '__main__': - DataCarrierTest().main() + DataCarrierTest(__file__).main() diff --git a/test/functional/mempool_dust.py b/test/functional/mempool_dust.py index e0c026207ae..1ea03a8a9ec 100755 --- a/test/functional/mempool_dust.py +++ b/test/functional/mempool_dust.py @@ -110,4 +110,4 @@ class DustRelayFeeTest(BitcoinTestFramework): if __name__ == '__main__': - DustRelayFeeTest().main() + DustRelayFeeTest(__file__).main() diff --git a/test/functional/mempool_expiry.py b/test/functional/mempool_expiry.py index 5eebe43488a..2bd88f98254 100755 --- a/test/functional/mempool_expiry.py +++ b/test/functional/mempool_expiry.py @@ -114,4 +114,4 @@ class MempoolExpiryTest(BitcoinTestFramework): if __name__ == '__main__': - MempoolExpiryTest().main() + MempoolExpiryTest(__file__).main() diff --git a/test/functional/mempool_limit.py b/test/functional/mempool_limit.py index 49a0a32c450..626928a49a9 100755 --- a/test/functional/mempool_limit.py +++ b/test/functional/mempool_limit.py @@ -342,4 +342,4 @@ class MempoolLimitTest(BitcoinTestFramework): if __name__ == '__main__': - MempoolLimitTest().main() + MempoolLimitTest(__file__).main() diff --git a/test/functional/mempool_package_limits.py b/test/functional/mempool_package_limits.py index 2a645975117..6e26a684e22 100755 --- a/test/functional/mempool_package_limits.py +++ b/test/functional/mempool_package_limits.py @@ -343,4 +343,4 @@ class MempoolPackageLimitsTest(BitcoinTestFramework): if __name__ == "__main__": - MempoolPackageLimitsTest().main() + MempoolPackageLimitsTest(__file__).main() diff --git a/test/functional/mempool_package_onemore.py b/test/functional/mempool_package_onemore.py index 632425814a8..fd54a8c3e1c 100755 --- a/test/functional/mempool_package_onemore.py +++ b/test/functional/mempool_package_onemore.py @@ -77,4 +77,4 @@ class MempoolPackagesTest(BitcoinTestFramework): if __name__ == '__main__': - MempoolPackagesTest().main() + MempoolPackagesTest(__file__).main() diff --git a/test/functional/mempool_package_rbf.py b/test/functional/mempool_package_rbf.py index e9658aa8d02..9b4269f0a0e 100755 --- a/test/functional/mempool_package_rbf.py +++ b/test/functional/mempool_package_rbf.py @@ -596,4 +596,4 @@ class PackageRBFTest(BitcoinTestFramework): assert child_result["txid"] not in mempool_info if __name__ == "__main__": - PackageRBFTest().main() + PackageRBFTest(__file__).main() diff --git a/test/functional/mempool_packages.py b/test/functional/mempool_packages.py index 4be6594de62..a844a2a1d8f 100755 --- a/test/functional/mempool_packages.py +++ b/test/functional/mempool_packages.py @@ -298,4 +298,4 @@ class MempoolPackagesTest(BitcoinTestFramework): self.sync_blocks() if __name__ == '__main__': - MempoolPackagesTest().main() + MempoolPackagesTest(__file__).main() diff --git a/test/functional/mempool_persist.py b/test/functional/mempool_persist.py index 32a927084aa..c64c203e504 100755 --- a/test/functional/mempool_persist.py +++ b/test/functional/mempool_persist.py @@ -263,4 +263,4 @@ class MempoolPersistTest(BitcoinTestFramework): if __name__ == "__main__": - MempoolPersistTest().main() + MempoolPersistTest(__file__).main() diff --git a/test/functional/mempool_reorg.py b/test/functional/mempool_reorg.py index 691518ea098..e27942760cc 100755 --- a/test/functional/mempool_reorg.py +++ b/test/functional/mempool_reorg.py @@ -194,4 +194,4 @@ class MempoolCoinbaseTest(BitcoinTestFramework): if __name__ == '__main__': - MempoolCoinbaseTest().main() + MempoolCoinbaseTest(__file__).main() diff --git a/test/functional/mempool_resurrect.py b/test/functional/mempool_resurrect.py index c10052372d3..720255b9e34 100755 --- a/test/functional/mempool_resurrect.py +++ b/test/functional/mempool_resurrect.py @@ -55,4 +55,4 @@ class MempoolCoinbaseTest(BitcoinTestFramework): if __name__ == '__main__': - MempoolCoinbaseTest().main() + MempoolCoinbaseTest(__file__).main() diff --git a/test/functional/mempool_sigoplimit.py b/test/functional/mempool_sigoplimit.py index d3fb5f91191..4656176a759 100755 --- a/test/functional/mempool_sigoplimit.py +++ b/test/functional/mempool_sigoplimit.py @@ -196,4 +196,4 @@ class BytesPerSigOpTest(BitcoinTestFramework): if __name__ == '__main__': - BytesPerSigOpTest().main() + BytesPerSigOpTest(__file__).main() diff --git a/test/functional/mempool_spend_coinbase.py b/test/functional/mempool_spend_coinbase.py index a7cb2ba6021..64ab33d3ffd 100755 --- a/test/functional/mempool_spend_coinbase.py +++ b/test/functional/mempool_spend_coinbase.py @@ -57,4 +57,4 @@ class MempoolSpendCoinbaseTest(BitcoinTestFramework): if __name__ == '__main__': - MempoolSpendCoinbaseTest().main() + MempoolSpendCoinbaseTest(__file__).main() diff --git a/test/functional/mempool_truc.py b/test/functional/mempool_truc.py index e1f3d772016..3f57b3e356e 100755 --- a/test/functional/mempool_truc.py +++ b/test/functional/mempool_truc.py @@ -644,4 +644,4 @@ class MempoolTRUC(BitcoinTestFramework): if __name__ == "__main__": - MempoolTRUC().main() + MempoolTRUC(__file__).main() diff --git a/test/functional/mempool_unbroadcast.py b/test/functional/mempool_unbroadcast.py index 12de7507314..7c96b4b570d 100755 --- a/test/functional/mempool_unbroadcast.py +++ b/test/functional/mempool_unbroadcast.py @@ -109,4 +109,4 @@ class MempoolUnbroadcastTest(BitcoinTestFramework): if __name__ == "__main__": - MempoolUnbroadcastTest().main() + MempoolUnbroadcastTest(__file__).main() diff --git a/test/functional/mempool_updatefromblock.py b/test/functional/mempool_updatefromblock.py index 8350e9c91ec..1754991756a 100755 --- a/test/functional/mempool_updatefromblock.py +++ b/test/functional/mempool_updatefromblock.py @@ -103,4 +103,4 @@ class MempoolUpdateFromBlockTest(BitcoinTestFramework): if __name__ == '__main__': - MempoolUpdateFromBlockTest().main() + MempoolUpdateFromBlockTest(__file__).main() diff --git a/test/functional/mining_basic.py b/test/functional/mining_basic.py index 5f2dde8eaca..6a364a48159 100755 --- a/test/functional/mining_basic.py +++ b/test/functional/mining_basic.py @@ -325,4 +325,4 @@ class MiningTest(BitcoinTestFramework): if __name__ == '__main__': - MiningTest().main() + MiningTest(__file__).main() diff --git a/test/functional/mining_getblocktemplate_longpoll.py b/test/functional/mining_getblocktemplate_longpoll.py index c0e7195c822..2d15151e650 100755 --- a/test/functional/mining_getblocktemplate_longpoll.py +++ b/test/functional/mining_getblocktemplate_longpoll.py @@ -73,4 +73,4 @@ class GetBlockTemplateLPTest(BitcoinTestFramework): assert not thr.is_alive() if __name__ == '__main__': - GetBlockTemplateLPTest().main() + GetBlockTemplateLPTest(__file__).main() diff --git a/test/functional/mining_prioritisetransaction.py b/test/functional/mining_prioritisetransaction.py index c5f34e3ecbf..eb55202e160 100755 --- a/test/functional/mining_prioritisetransaction.py +++ b/test/functional/mining_prioritisetransaction.py @@ -305,4 +305,4 @@ class PrioritiseTransactionTest(BitcoinTestFramework): assert template != new_template if __name__ == '__main__': - PrioritiseTransactionTest().main() + PrioritiseTransactionTest(__file__).main() diff --git a/test/functional/p2p_1p1c_network.py b/test/functional/p2p_1p1c_network.py index ea592485067..c3cdb3e0b31 100755 --- a/test/functional/p2p_1p1c_network.py +++ b/test/functional/p2p_1p1c_network.py @@ -163,4 +163,4 @@ class PackageRelayTest(BitcoinTestFramework): if __name__ == '__main__': - PackageRelayTest().main() + PackageRelayTest(__file__).main() diff --git a/test/functional/p2p_add_connections.py b/test/functional/p2p_add_connections.py index bd766a279ef..886de36fccf 100755 --- a/test/functional/p2p_add_connections.py +++ b/test/functional/p2p_add_connections.py @@ -107,4 +107,4 @@ class P2PAddConnections(BitcoinTestFramework): assert_equal(feeler_conn.last_message["version"].relay, 0) if __name__ == '__main__': - P2PAddConnections().main() + P2PAddConnections(__file__).main() diff --git a/test/functional/p2p_addr_relay.py b/test/functional/p2p_addr_relay.py index d10e47e0367..56a9e6a84e1 100755 --- a/test/functional/p2p_addr_relay.py +++ b/test/functional/p2p_addr_relay.py @@ -441,4 +441,4 @@ class AddrTest(BitcoinTestFramework): if __name__ == '__main__': - AddrTest().main() + AddrTest(__file__).main() diff --git a/test/functional/p2p_addrfetch.py b/test/functional/p2p_addrfetch.py index 3ead653ba69..69cc106341d 100755 --- a/test/functional/p2p_addrfetch.py +++ b/test/functional/p2p_addrfetch.py @@ -83,4 +83,4 @@ class P2PAddrFetch(BitcoinTestFramework): if __name__ == '__main__': - P2PAddrFetch().main() + P2PAddrFetch(__file__).main() diff --git a/test/functional/p2p_addrv2_relay.py b/test/functional/p2p_addrv2_relay.py index 4ec8e0bc043..d5ded926d36 100755 --- a/test/functional/p2p_addrv2_relay.py +++ b/test/functional/p2p_addrv2_relay.py @@ -110,4 +110,4 @@ class AddrTest(BitcoinTestFramework): if __name__ == '__main__': - AddrTest().main() + AddrTest(__file__).main() diff --git a/test/functional/p2p_block_sync.py b/test/functional/p2p_block_sync.py index 6c7f08364e3..51bbac17387 100755 --- a/test/functional/p2p_block_sync.py +++ b/test/functional/p2p_block_sync.py @@ -34,4 +34,4 @@ class BlockSyncTest(BitcoinTestFramework): if __name__ == '__main__': - BlockSyncTest().main() + BlockSyncTest(__file__).main() diff --git a/test/functional/p2p_blockfilters.py b/test/functional/p2p_blockfilters.py index 680fa9c7faf..88d5aa1408c 100755 --- a/test/functional/p2p_blockfilters.py +++ b/test/functional/p2p_blockfilters.py @@ -282,4 +282,4 @@ def compute_last_header(prev_header, hashes): if __name__ == '__main__': - CompactFiltersTest().main() + CompactFiltersTest(__file__).main() diff --git a/test/functional/p2p_blocksonly.py b/test/functional/p2p_blocksonly.py index 637644e6e44..b9e6dc90563 100755 --- a/test/functional/p2p_blocksonly.py +++ b/test/functional/p2p_blocksonly.py @@ -125,4 +125,4 @@ class P2PBlocksOnly(BitcoinTestFramework): if __name__ == '__main__': - P2PBlocksOnly().main() + P2PBlocksOnly(__file__).main() diff --git a/test/functional/p2p_compactblocks.py b/test/functional/p2p_compactblocks.py index 9e314db1108..49cf26d425c 100755 --- a/test/functional/p2p_compactblocks.py +++ b/test/functional/p2p_compactblocks.py @@ -965,4 +965,4 @@ class CompactBlocksTest(BitcoinTestFramework): if __name__ == '__main__': - CompactBlocksTest().main() + CompactBlocksTest(__file__).main() diff --git a/test/functional/p2p_compactblocks_blocksonly.py b/test/functional/p2p_compactblocks_blocksonly.py index 761cd3a2181..b92efc875ca 100755 --- a/test/functional/p2p_compactblocks_blocksonly.py +++ b/test/functional/p2p_compactblocks_blocksonly.py @@ -127,4 +127,4 @@ class P2PCompactBlocksBlocksOnly(BitcoinTestFramework): p2p_conn_blocksonly.wait_until(lambda: test_for_cmpctblock(block2)) if __name__ == '__main__': - P2PCompactBlocksBlocksOnly().main() + P2PCompactBlocksBlocksOnly(__file__).main() diff --git a/test/functional/p2p_compactblocks_hb.py b/test/functional/p2p_compactblocks_hb.py index 023b33ff6d7..e4f58e9cf7c 100755 --- a/test/functional/p2p_compactblocks_hb.py +++ b/test/functional/p2p_compactblocks_hb.py @@ -97,4 +97,4 @@ class CompactBlocksConnectionTest(BitcoinTestFramework): if __name__ == '__main__': - CompactBlocksConnectionTest().main() + CompactBlocksConnectionTest(__file__).main() diff --git a/test/functional/p2p_disconnect_ban.py b/test/functional/p2p_disconnect_ban.py index e47f9c732bf..94be86475ea 100755 --- a/test/functional/p2p_disconnect_ban.py +++ b/test/functional/p2p_disconnect_ban.py @@ -147,4 +147,4 @@ class DisconnectBanTest(BitcoinTestFramework): assert not [node for node in self.nodes[0].getpeerinfo() if node['id'] == id1] if __name__ == '__main__': - DisconnectBanTest().main() + DisconnectBanTest(__file__).main() diff --git a/test/functional/p2p_dns_seeds.py b/test/functional/p2p_dns_seeds.py index e58ad8e0fc8..a2d4ea110f7 100755 --- a/test/functional/p2p_dns_seeds.py +++ b/test/functional/p2p_dns_seeds.py @@ -126,4 +126,4 @@ class P2PDNSSeeds(BitcoinTestFramework): if __name__ == '__main__': - P2PDNSSeeds().main() + P2PDNSSeeds(__file__).main() diff --git a/test/functional/p2p_dos_header_tree.py b/test/functional/p2p_dos_header_tree.py index 4b4346af491..fbb5d716f5b 100755 --- a/test/functional/p2p_dos_header_tree.py +++ b/test/functional/p2p_dos_header_tree.py @@ -85,4 +85,4 @@ class RejectLowDifficultyHeadersTest(BitcoinTestFramework): if __name__ == '__main__': - RejectLowDifficultyHeadersTest().main() + RejectLowDifficultyHeadersTest(__file__).main() diff --git a/test/functional/p2p_eviction.py b/test/functional/p2p_eviction.py index 8b31dfa549e..0d2bdcc429c 100755 --- a/test/functional/p2p_eviction.py +++ b/test/functional/p2p_eviction.py @@ -124,4 +124,4 @@ class P2PEvict(BitcoinTestFramework): if __name__ == '__main__': - P2PEvict().main() + P2PEvict(__file__).main() diff --git a/test/functional/p2p_feefilter.py b/test/functional/p2p_feefilter.py index bcba534f9a5..6b441184678 100755 --- a/test/functional/p2p_feefilter.py +++ b/test/functional/p2p_feefilter.py @@ -132,4 +132,4 @@ class FeeFilterTest(BitcoinTestFramework): if __name__ == '__main__': - FeeFilterTest().main() + FeeFilterTest(__file__).main() diff --git a/test/functional/p2p_filter.py b/test/functional/p2p_filter.py index 7c8ed58e51c..e4aaf507cf3 100755 --- a/test/functional/p2p_filter.py +++ b/test/functional/p2p_filter.py @@ -252,4 +252,4 @@ class FilterTest(BitcoinTestFramework): if __name__ == '__main__': - FilterTest().main() + FilterTest(__file__).main() diff --git a/test/functional/p2p_fingerprint.py b/test/functional/p2p_fingerprint.py index e8bba8555fc..f49be62056d 100755 --- a/test/functional/p2p_fingerprint.py +++ b/test/functional/p2p_fingerprint.py @@ -130,4 +130,4 @@ class P2PFingerprintTest(BitcoinTestFramework): if __name__ == '__main__': - P2PFingerprintTest().main() + P2PFingerprintTest(__file__).main() diff --git a/test/functional/p2p_getaddr_caching.py b/test/functional/p2p_getaddr_caching.py index 60b43c32ae6..6626b14ee0f 100755 --- a/test/functional/p2p_getaddr_caching.py +++ b/test/functional/p2p_getaddr_caching.py @@ -119,4 +119,4 @@ class AddrTest(BitcoinTestFramework): if __name__ == '__main__': - AddrTest().main() + AddrTest(__file__).main() diff --git a/test/functional/p2p_getdata.py b/test/functional/p2p_getdata.py index 89d68d5ba07..6153d08d9b4 100755 --- a/test/functional/p2p_getdata.py +++ b/test/functional/p2p_getdata.py @@ -46,4 +46,4 @@ class GetdataTest(BitcoinTestFramework): if __name__ == '__main__': - GetdataTest().main() + GetdataTest(__file__).main() diff --git a/test/functional/p2p_handshake.py b/test/functional/p2p_handshake.py index 9536e748931..18307a28247 100755 --- a/test/functional/p2p_handshake.py +++ b/test/functional/p2p_handshake.py @@ -97,4 +97,4 @@ class P2PHandshakeTest(BitcoinTestFramework): if __name__ == '__main__': - P2PHandshakeTest().main() + P2PHandshakeTest(__file__).main() diff --git a/test/functional/p2p_headers_sync_with_minchainwork.py b/test/functional/p2p_headers_sync_with_minchainwork.py index 832fd7e0e95..9055232cf31 100755 --- a/test/functional/p2p_headers_sync_with_minchainwork.py +++ b/test/functional/p2p_headers_sync_with_minchainwork.py @@ -162,4 +162,4 @@ class RejectLowDifficultyHeadersTest(BitcoinTestFramework): if __name__ == '__main__': - RejectLowDifficultyHeadersTest().main() + RejectLowDifficultyHeadersTest(__file__).main() diff --git a/test/functional/p2p_i2p_ports.py b/test/functional/p2p_i2p_ports.py index 20dcb50a574..b1a3c61c7a3 100755 --- a/test/functional/p2p_i2p_ports.py +++ b/test/functional/p2p_i2p_ports.py @@ -32,4 +32,4 @@ class I2PPorts(BitcoinTestFramework): if __name__ == '__main__': - I2PPorts().main() + I2PPorts(__file__).main() diff --git a/test/functional/p2p_i2p_sessions.py b/test/functional/p2p_i2p_sessions.py index 9e7fdc6e144..67474f6c0ea 100755 --- a/test/functional/p2p_i2p_sessions.py +++ b/test/functional/p2p_i2p_sessions.py @@ -33,4 +33,4 @@ class I2PSessions(BitcoinTestFramework): if __name__ == '__main__': - I2PSessions().main() + I2PSessions(__file__).main() diff --git a/test/functional/p2p_ibd_stalling.py b/test/functional/p2p_ibd_stalling.py index 830f374d632..11cd8837f46 100755 --- a/test/functional/p2p_ibd_stalling.py +++ b/test/functional/p2p_ibd_stalling.py @@ -162,4 +162,4 @@ class P2PIBDStallingTest(BitcoinTestFramework): if __name__ == '__main__': - P2PIBDStallingTest().main() + P2PIBDStallingTest(__file__).main() diff --git a/test/functional/p2p_ibd_txrelay.py b/test/functional/p2p_ibd_txrelay.py index b93e39a9250..882f5b5c134 100755 --- a/test/functional/p2p_ibd_txrelay.py +++ b/test/functional/p2p_ibd_txrelay.py @@ -86,4 +86,4 @@ class P2PIBDTxRelayTest(BitcoinTestFramework): peer_txer.send_and_ping(msg_tx(tx)) if __name__ == '__main__': - P2PIBDTxRelayTest().main() + P2PIBDTxRelayTest(__file__).main() diff --git a/test/functional/p2p_initial_headers_sync.py b/test/functional/p2p_initial_headers_sync.py index bc6e0fb3555..5c17b756770 100755 --- a/test/functional/p2p_initial_headers_sync.py +++ b/test/functional/p2p_initial_headers_sync.py @@ -96,5 +96,5 @@ class HeadersSyncTest(BitcoinTestFramework): self.log.info("Success!") if __name__ == '__main__': - HeadersSyncTest().main() + HeadersSyncTest(__file__).main() diff --git a/test/functional/p2p_invalid_block.py b/test/functional/p2p_invalid_block.py index 8ec62ae5eef..c4c79dcbb87 100755 --- a/test/functional/p2p_invalid_block.py +++ b/test/functional/p2p_invalid_block.py @@ -138,4 +138,4 @@ class InvalidBlockRequestTest(BitcoinTestFramework): if __name__ == '__main__': - InvalidBlockRequestTest().main() + InvalidBlockRequestTest(__file__).main() diff --git a/test/functional/p2p_invalid_locator.py b/test/functional/p2p_invalid_locator.py index 32a23532a23..bde01d5c95d 100755 --- a/test/functional/p2p_invalid_locator.py +++ b/test/functional/p2p_invalid_locator.py @@ -39,4 +39,4 @@ class InvalidLocatorTest(BitcoinTestFramework): if __name__ == '__main__': - InvalidLocatorTest().main() + InvalidLocatorTest(__file__).main() diff --git a/test/functional/p2p_invalid_messages.py b/test/functional/p2p_invalid_messages.py index 8e459ba676e..507393fb707 100755 --- a/test/functional/p2p_invalid_messages.py +++ b/test/functional/p2p_invalid_messages.py @@ -356,4 +356,4 @@ class InvalidMessagesTest(BitcoinTestFramework): if __name__ == '__main__': - InvalidMessagesTest().main() + InvalidMessagesTest(__file__).main() diff --git a/test/functional/p2p_invalid_tx.py b/test/functional/p2p_invalid_tx.py index 0ae05d4b0ba..241aefab245 100755 --- a/test/functional/p2p_invalid_tx.py +++ b/test/functional/p2p_invalid_tx.py @@ -224,4 +224,4 @@ class InvalidTxRequestTest(BitcoinTestFramework): if __name__ == '__main__': - InvalidTxRequestTest().main() + InvalidTxRequestTest(__file__).main() diff --git a/test/functional/p2p_leak.py b/test/functional/p2p_leak.py index 645488f24d9..f800e815d8d 100755 --- a/test/functional/p2p_leak.py +++ b/test/functional/p2p_leak.py @@ -178,4 +178,4 @@ class P2PLeakTest(BitcoinTestFramework): if __name__ == '__main__': - P2PLeakTest().main() + P2PLeakTest(__file__).main() diff --git a/test/functional/p2p_leak_tx.py b/test/functional/p2p_leak_tx.py index f53f98e06d1..a2eec49b727 100755 --- a/test/functional/p2p_leak_tx.py +++ b/test/functional/p2p_leak_tx.py @@ -104,4 +104,4 @@ class P2PLeakTxTest(BitcoinTestFramework): if __name__ == '__main__': - P2PLeakTxTest().main() + P2PLeakTxTest(__file__).main() diff --git a/test/functional/p2p_message_capture.py b/test/functional/p2p_message_capture.py index 691a0b6409c..4c82adc58c9 100755 --- a/test/functional/p2p_message_capture.py +++ b/test/functional/p2p_message_capture.py @@ -69,4 +69,4 @@ class MessageCaptureTest(BitcoinTestFramework): if __name__ == '__main__': - MessageCaptureTest().main() + MessageCaptureTest(__file__).main() diff --git a/test/functional/p2p_mutated_blocks.py b/test/functional/p2p_mutated_blocks.py index 708b19b1e59..4a790168dad 100755 --- a/test/functional/p2p_mutated_blocks.py +++ b/test/functional/p2p_mutated_blocks.py @@ -112,4 +112,4 @@ class MutatedBlocksTest(BitcoinTestFramework): if __name__ == '__main__': - MutatedBlocksTest().main() + MutatedBlocksTest(__file__).main() diff --git a/test/functional/p2p_net_deadlock.py b/test/functional/p2p_net_deadlock.py index 1a357b944b6..4f1b731e218 100755 --- a/test/functional/p2p_net_deadlock.py +++ b/test/functional/p2p_net_deadlock.py @@ -34,4 +34,4 @@ class NetDeadlockTest(BitcoinTestFramework): if __name__ == '__main__': - NetDeadlockTest().main() + NetDeadlockTest(__file__).main() diff --git a/test/functional/p2p_nobloomfilter_messages.py b/test/functional/p2p_nobloomfilter_messages.py index 507a71b2a91..dd2dc9ae69a 100755 --- a/test/functional/p2p_nobloomfilter_messages.py +++ b/test/functional/p2p_nobloomfilter_messages.py @@ -45,4 +45,4 @@ class P2PNoBloomFilterMessages(BitcoinTestFramework): if __name__ == '__main__': - P2PNoBloomFilterMessages().main() + P2PNoBloomFilterMessages(__file__).main() diff --git a/test/functional/p2p_node_network_limited.py b/test/functional/p2p_node_network_limited.py index 8b63d8ee26d..df6e6a2e28a 100755 --- a/test/functional/p2p_node_network_limited.py +++ b/test/functional/p2p_node_network_limited.py @@ -172,4 +172,4 @@ class NodeNetworkLimitedTest(BitcoinTestFramework): self.test_avoid_requesting_historical_blocks() if __name__ == '__main__': - NodeNetworkLimitedTest().main() + NodeNetworkLimitedTest(__file__).main() diff --git a/test/functional/p2p_opportunistic_1p1c.py b/test/functional/p2p_opportunistic_1p1c.py index aec6e95fbcf..4477046c8d6 100755 --- a/test/functional/p2p_opportunistic_1p1c.py +++ b/test/functional/p2p_opportunistic_1p1c.py @@ -412,4 +412,4 @@ class PackageRelayTest(BitcoinTestFramework): if __name__ == '__main__': - PackageRelayTest().main() + PackageRelayTest(__file__).main() diff --git a/test/functional/p2p_orphan_handling.py b/test/functional/p2p_orphan_handling.py index f525d87cca0..22600bf8a4e 100755 --- a/test/functional/p2p_orphan_handling.py +++ b/test/functional/p2p_orphan_handling.py @@ -585,4 +585,4 @@ class OrphanHandlingTest(BitcoinTestFramework): if __name__ == '__main__': - OrphanHandlingTest().main() + OrphanHandlingTest(__file__).main() diff --git a/test/functional/p2p_outbound_eviction.py b/test/functional/p2p_outbound_eviction.py index 8d896889990..30ac85e32f3 100755 --- a/test/functional/p2p_outbound_eviction.py +++ b/test/functional/p2p_outbound_eviction.py @@ -250,4 +250,4 @@ class P2POutEvict(BitcoinTestFramework): if __name__ == '__main__': - P2POutEvict().main() + P2POutEvict(__file__).main() diff --git a/test/functional/p2p_permissions.py b/test/functional/p2p_permissions.py index 80a27943fdf..5ca51016132 100755 --- a/test/functional/p2p_permissions.py +++ b/test/functional/p2p_permissions.py @@ -147,4 +147,4 @@ class P2PPermissionsTests(BitcoinTestFramework): if __name__ == '__main__': - P2PPermissionsTests().main() + P2PPermissionsTests(__file__).main() diff --git a/test/functional/p2p_ping.py b/test/functional/p2p_ping.py index 3ba30a42b1a..5c10ac2a4be 100755 --- a/test/functional/p2p_ping.py +++ b/test/functional/p2p_ping.py @@ -117,4 +117,4 @@ class PingPongTest(BitcoinTestFramework): if __name__ == '__main__': - PingPongTest().main() + PingPongTest(__file__).main() diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py index d20cf41a72c..9be53d2ab8b 100755 --- a/test/functional/p2p_segwit.py +++ b/test/functional/p2p_segwit.py @@ -2067,4 +2067,4 @@ class SegWitTest(BitcoinTestFramework): if __name__ == '__main__': - SegWitTest().main() + SegWitTest(__file__).main() diff --git a/test/functional/p2p_sendheaders.py b/test/functional/p2p_sendheaders.py index 5c463267a1c..db706556d82 100755 --- a/test/functional/p2p_sendheaders.py +++ b/test/functional/p2p_sendheaders.py @@ -568,4 +568,4 @@ class SendHeadersTest(BitcoinTestFramework): assert "getdata" not in inv_node.last_message if __name__ == '__main__': - SendHeadersTest().main() + SendHeadersTest(__file__).main() diff --git a/test/functional/p2p_sendtxrcncl.py b/test/functional/p2p_sendtxrcncl.py index 8f5e6c03873..2c7216b5ca3 100755 --- a/test/functional/p2p_sendtxrcncl.py +++ b/test/functional/p2p_sendtxrcncl.py @@ -232,4 +232,4 @@ class SendTxRcnclTest(BitcoinTestFramework): if __name__ == '__main__': - SendTxRcnclTest().main() + SendTxRcnclTest(__file__).main() diff --git a/test/functional/p2p_timeouts.py b/test/functional/p2p_timeouts.py index 80d7b6e9ae3..1fd78e163b4 100755 --- a/test/functional/p2p_timeouts.py +++ b/test/functional/p2p_timeouts.py @@ -109,4 +109,4 @@ class TimeoutsTest(BitcoinTestFramework): if __name__ == '__main__': - TimeoutsTest().main() + TimeoutsTest(__file__).main() diff --git a/test/functional/p2p_tx_download.py b/test/functional/p2p_tx_download.py index 0af6b1d2c97..11b4d9cc3b8 100755 --- a/test/functional/p2p_tx_download.py +++ b/test/functional/p2p_tx_download.py @@ -306,4 +306,4 @@ class TxDownloadTest(BitcoinTestFramework): if __name__ == '__main__': - TxDownloadTest().main() + TxDownloadTest(__file__).main() diff --git a/test/functional/p2p_tx_privacy.py b/test/functional/p2p_tx_privacy.py index e674f6c3eb6..afe9df8a0f8 100755 --- a/test/functional/p2p_tx_privacy.py +++ b/test/functional/p2p_tx_privacy.py @@ -74,4 +74,4 @@ class TxPrivacyTest(BitcoinTestFramework): spy.wait_for_inv_match(CInv(MSG_WTX, tx2.calc_sha256(True))) if __name__ == '__main__': - TxPrivacyTest().main() + TxPrivacyTest(__file__).main() diff --git a/test/functional/p2p_unrequested_blocks.py b/test/functional/p2p_unrequested_blocks.py index 776eaf5255c..835ecbf184f 100755 --- a/test/functional/p2p_unrequested_blocks.py +++ b/test/functional/p2p_unrequested_blocks.py @@ -296,4 +296,4 @@ class AcceptBlockTest(BitcoinTestFramework): self.log.info("Successfully synced nodes 1 and 0") if __name__ == '__main__': - AcceptBlockTest().main() + AcceptBlockTest(__file__).main() diff --git a/test/functional/p2p_v2_encrypted.py b/test/functional/p2p_v2_encrypted.py index 05755dece05..3e8ce09d24d 100755 --- a/test/functional/p2p_v2_encrypted.py +++ b/test/functional/p2p_v2_encrypted.py @@ -131,4 +131,4 @@ class P2PEncrypted(BitcoinTestFramework): if __name__ == '__main__': - P2PEncrypted().main() + P2PEncrypted(__file__).main() diff --git a/test/functional/p2p_v2_misbehaving.py b/test/functional/p2p_v2_misbehaving.py index 9017ee94559..b66d0289ffc 100755 --- a/test/functional/p2p_v2_misbehaving.py +++ b/test/functional/p2p_v2_misbehaving.py @@ -185,4 +185,4 @@ class EncryptedP2PMisbehaving(BitcoinTestFramework): if __name__ == '__main__': - EncryptedP2PMisbehaving().main() + EncryptedP2PMisbehaving(__file__).main() diff --git a/test/functional/p2p_v2_transport.py b/test/functional/p2p_v2_transport.py index fe2449124d9..94c91906e6f 100755 --- a/test/functional/p2p_v2_transport.py +++ b/test/functional/p2p_v2_transport.py @@ -168,4 +168,4 @@ class V2TransportTest(BitcoinTestFramework): if __name__ == '__main__': - V2TransportTest().main() + V2TransportTest(__file__).main() diff --git a/test/functional/rpc_bind.py b/test/functional/rpc_bind.py index 3106419e5cd..8c76c1f5f59 100755 --- a/test/functional/rpc_bind.py +++ b/test/functional/rpc_bind.py @@ -124,4 +124,4 @@ class RPCBindTest(BitcoinTestFramework): assert_raises_rpc_error(-342, "non-JSON HTTP response with '403 Forbidden' from server", self.run_allowip_test, ['1.1.1.1'], self.non_loopback_ip, self.defaultport) if __name__ == '__main__': - RPCBindTest().main() + RPCBindTest(__file__).main() diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py index 9b7743cafa1..e5aca7f138b 100755 --- a/test/functional/rpc_blockchain.py +++ b/test/functional/rpc_blockchain.py @@ -635,4 +635,4 @@ class BlockchainTest(BitcoinTestFramework): if __name__ == '__main__': - BlockchainTest().main() + BlockchainTest(__file__).main() diff --git a/test/functional/rpc_createmultisig.py b/test/functional/rpc_createmultisig.py index 37656341d26..9f4e17a3288 100755 --- a/test/functional/rpc_createmultisig.py +++ b/test/functional/rpc_createmultisig.py @@ -257,4 +257,4 @@ class RpcCreateMultiSigTest(BitcoinTestFramework): if __name__ == '__main__': - RpcCreateMultiSigTest().main() + RpcCreateMultiSigTest(__file__).main() diff --git a/test/functional/rpc_decodescript.py b/test/functional/rpc_decodescript.py index f37e61ab509..66dbd785731 100755 --- a/test/functional/rpc_decodescript.py +++ b/test/functional/rpc_decodescript.py @@ -289,4 +289,4 @@ class DecodeScriptTest(BitcoinTestFramework): self.decodescript_miniscript() if __name__ == '__main__': - DecodeScriptTest().main() + DecodeScriptTest(__file__).main() diff --git a/test/functional/rpc_deprecated.py b/test/functional/rpc_deprecated.py index 15c77ed8569..4a415d57f55 100755 --- a/test/functional/rpc_deprecated.py +++ b/test/functional/rpc_deprecated.py @@ -26,4 +26,4 @@ class DeprecatedRpcTest(BitcoinTestFramework): self.log.info("No tested deprecated RPC methods") if __name__ == '__main__': - DeprecatedRpcTest().main() + DeprecatedRpcTest(__file__).main() diff --git a/test/functional/rpc_deriveaddresses.py b/test/functional/rpc_deriveaddresses.py index 64994d6bb30..c66d91713fe 100755 --- a/test/functional/rpc_deriveaddresses.py +++ b/test/functional/rpc_deriveaddresses.py @@ -61,4 +61,4 @@ class DeriveaddressesTest(BitcoinTestFramework): assert_raises_rpc_error(-5, "Descriptor does not have a corresponding address", self.nodes[0].deriveaddresses, bare_multisig_descriptor) if __name__ == '__main__': - DeriveaddressesTest().main() + DeriveaddressesTest(__file__).main() diff --git a/test/functional/rpc_dumptxoutset.py b/test/functional/rpc_dumptxoutset.py index c92c8da3570..0b7c4688465 100755 --- a/test/functional/rpc_dumptxoutset.py +++ b/test/functional/rpc_dumptxoutset.py @@ -58,4 +58,4 @@ class DumptxoutsetTest(BitcoinTestFramework): if __name__ == '__main__': - DumptxoutsetTest().main() + DumptxoutsetTest(__file__).main() diff --git a/test/functional/rpc_estimatefee.py b/test/functional/rpc_estimatefee.py index 6643799a767..05ceafbe4e0 100755 --- a/test/functional/rpc_estimatefee.py +++ b/test/functional/rpc_estimatefee.py @@ -52,4 +52,4 @@ class EstimateFeeTest(BitcoinTestFramework): if __name__ == '__main__': - EstimateFeeTest().main() + EstimateFeeTest(__file__).main() diff --git a/test/functional/rpc_generate.py b/test/functional/rpc_generate.py index 3e250925e78..68de9006644 100755 --- a/test/functional/rpc_generate.py +++ b/test/functional/rpc_generate.py @@ -126,4 +126,4 @@ class RPCGenerateTest(BitcoinTestFramework): if __name__ == "__main__": - RPCGenerateTest().main() + RPCGenerateTest(__file__).main() diff --git a/test/functional/rpc_getblockfilter.py b/test/functional/rpc_getblockfilter.py index b09af9e0781..245bcec8e8e 100755 --- a/test/functional/rpc_getblockfilter.py +++ b/test/functional/rpc_getblockfilter.py @@ -61,4 +61,4 @@ class GetBlockFilterTest(BitcoinTestFramework): self.nodes[0].getblockfilter, genesis_hash, filter_type) if __name__ == '__main__': - GetBlockFilterTest().main() + GetBlockFilterTest(__file__).main() diff --git a/test/functional/rpc_getblockfrompeer.py b/test/functional/rpc_getblockfrompeer.py index 1ab1023cf14..e309018516c 100755 --- a/test/functional/rpc_getblockfrompeer.py +++ b/test/functional/rpc_getblockfrompeer.py @@ -154,4 +154,4 @@ class GetBlockFromPeerTest(BitcoinTestFramework): if __name__ == '__main__': - GetBlockFromPeerTest().main() + GetBlockFromPeerTest(__file__).main() diff --git a/test/functional/rpc_getblockstats.py b/test/functional/rpc_getblockstats.py index bf261befcc8..d1e4895eb6d 100755 --- a/test/functional/rpc_getblockstats.py +++ b/test/functional/rpc_getblockstats.py @@ -183,4 +183,4 @@ class GetblockstatsTest(BitcoinTestFramework): assert_equal(tip_stats["utxo_size_inc_actual"], 300) if __name__ == '__main__': - GetblockstatsTest().main() + GetblockstatsTest(__file__).main() diff --git a/test/functional/rpc_getchaintips.py b/test/functional/rpc_getchaintips.py index 7efa306c8c6..1bd4413ce1e 100755 --- a/test/functional/rpc_getchaintips.py +++ b/test/functional/rpc_getchaintips.py @@ -58,4 +58,4 @@ class GetChainTipsTest (BitcoinTestFramework): assert_equal (tips[1], shortTip) if __name__ == '__main__': - GetChainTipsTest ().main () + GetChainTipsTest(__file__).main() diff --git a/test/functional/rpc_getdescriptorinfo.py b/test/functional/rpc_getdescriptorinfo.py index 2eb36f260c6..c84928462dd 100755 --- a/test/functional/rpc_getdescriptorinfo.py +++ b/test/functional/rpc_getdescriptorinfo.py @@ -63,4 +63,4 @@ class DescriptorTest(BitcoinTestFramework): if __name__ == '__main__': - DescriptorTest().main() + DescriptorTest(__file__).main() diff --git a/test/functional/rpc_help.py b/test/functional/rpc_help.py index 53c5aa05e5e..4ce24ecb67d 100755 --- a/test/functional/rpc_help.py +++ b/test/functional/rpc_help.py @@ -132,4 +132,4 @@ class HelpRpcTest(BitcoinTestFramework): if __name__ == '__main__': - HelpRpcTest().main() + HelpRpcTest(__file__).main() diff --git a/test/functional/rpc_invalid_address_message.py b/test/functional/rpc_invalid_address_message.py index 6759b69dd1b..f712530c3ba 100755 --- a/test/functional/rpc_invalid_address_message.py +++ b/test/functional/rpc_invalid_address_message.py @@ -119,4 +119,4 @@ class InvalidAddressErrorMessageTest(BitcoinTestFramework): if __name__ == '__main__': - InvalidAddressErrorMessageTest().main() + InvalidAddressErrorMessageTest(__file__).main() diff --git a/test/functional/rpc_invalidateblock.py b/test/functional/rpc_invalidateblock.py index 69c5397ce25..db79d552590 100755 --- a/test/functional/rpc_invalidateblock.py +++ b/test/functional/rpc_invalidateblock.py @@ -90,4 +90,4 @@ class InvalidateTest(BitcoinTestFramework): if __name__ == '__main__': - InvalidateTest().main() + InvalidateTest(__file__).main() diff --git a/test/functional/rpc_mempool_info.py b/test/functional/rpc_mempool_info.py index 246af22e505..231d93a7b15 100755 --- a/test/functional/rpc_mempool_info.py +++ b/test/functional/rpc_mempool_info.py @@ -96,4 +96,4 @@ class RPCMempoolInfoTest(BitcoinTestFramework): if __name__ == '__main__': - RPCMempoolInfoTest().main() + RPCMempoolInfoTest(__file__).main() diff --git a/test/functional/rpc_misc.py b/test/functional/rpc_misc.py index 20485c01d35..b5c12b28c1c 100755 --- a/test/functional/rpc_misc.py +++ b/test/functional/rpc_misc.py @@ -102,4 +102,4 @@ class RpcMiscTest(BitcoinTestFramework): if __name__ == '__main__': - RpcMiscTest().main() + RpcMiscTest(__file__).main() diff --git a/test/functional/rpc_named_arguments.py b/test/functional/rpc_named_arguments.py index 46d9ffceae1..0385c332671 100755 --- a/test/functional/rpc_named_arguments.py +++ b/test/functional/rpc_named_arguments.py @@ -35,4 +35,4 @@ class NamedArgumentTest(BitcoinTestFramework): assert_raises_rpc_error(-8, "Parameter arg1 specified twice both as positional and named argument", node.echo, 0, None, 2, arg1=1) if __name__ == '__main__': - NamedArgumentTest().main() + NamedArgumentTest(__file__).main() diff --git a/test/functional/rpc_net.py b/test/functional/rpc_net.py index 37e2c1fb714..b63059b1eec 100755 --- a/test/functional/rpc_net.py +++ b/test/functional/rpc_net.py @@ -574,4 +574,4 @@ class NetTest(BitcoinTestFramework): if __name__ == '__main__': - NetTest().main() + NetTest(__file__).main() diff --git a/test/functional/rpc_packages.py b/test/functional/rpc_packages.py index 1acd586d2c4..ef2f66b3a01 100755 --- a/test/functional/rpc_packages.py +++ b/test/functional/rpc_packages.py @@ -489,4 +489,4 @@ class RPCPackagesTest(BitcoinTestFramework): assert_equal(node.getrawmempool(), [chained_txns_burn[0]["txid"]]) if __name__ == "__main__": - RPCPackagesTest().main() + RPCPackagesTest(__file__).main() diff --git a/test/functional/rpc_preciousblock.py b/test/functional/rpc_preciousblock.py index 3062a865650..224bba6f9b4 100755 --- a/test/functional/rpc_preciousblock.py +++ b/test/functional/rpc_preciousblock.py @@ -109,4 +109,4 @@ class PreciousTest(BitcoinTestFramework): assert_equal(self.nodes[2].getbestblockhash(), hashH) if __name__ == '__main__': - PreciousTest().main() + PreciousTest(__file__).main() diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py index a56960adff7..8c5f98286af 100755 --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -985,4 +985,4 @@ class PSBTTest(BitcoinTestFramework): if __name__ == '__main__': - PSBTTest().main() + PSBTTest(__file__).main() diff --git a/test/functional/rpc_rawtransaction.py b/test/functional/rpc_rawtransaction.py index f974a05f7b8..aa179e009d5 100755 --- a/test/functional/rpc_rawtransaction.py +++ b/test/functional/rpc_rawtransaction.py @@ -612,4 +612,4 @@ class RawTransactionsTest(BitcoinTestFramework): if __name__ == '__main__': - RawTransactionsTest().main() + RawTransactionsTest(__file__).main() diff --git a/test/functional/rpc_scanblocks.py b/test/functional/rpc_scanblocks.py index 8b4aebc77ac..d05ba09ba52 100755 --- a/test/functional/rpc_scanblocks.py +++ b/test/functional/rpc_scanblocks.py @@ -136,4 +136,4 @@ class ScanblocksTest(BitcoinTestFramework): if __name__ == '__main__': - ScanblocksTest().main() + ScanblocksTest(__file__).main() diff --git a/test/functional/rpc_scantxoutset.py b/test/functional/rpc_scantxoutset.py index 9f77f209efc..078a24d577f 100755 --- a/test/functional/rpc_scantxoutset.py +++ b/test/functional/rpc_scantxoutset.py @@ -131,4 +131,4 @@ class ScantxoutsetTest(BitcoinTestFramework): if __name__ == "__main__": - ScantxoutsetTest().main() + ScantxoutsetTest(__file__).main() diff --git a/test/functional/rpc_setban.py b/test/functional/rpc_setban.py index ba86b278bd3..c4e5ebccca2 100755 --- a/test/functional/rpc_setban.py +++ b/test/functional/rpc_setban.py @@ -75,4 +75,4 @@ class SetBanTests(BitcoinTestFramework): assert_equal(banned['ban_duration'], 1234) if __name__ == '__main__': - SetBanTests().main() + SetBanTests(__file__).main() diff --git a/test/functional/rpc_signer.py b/test/functional/rpc_signer.py index 488682e9591..7dd16ea8fee 100755 --- a/test/functional/rpc_signer.py +++ b/test/functional/rpc_signer.py @@ -77,4 +77,4 @@ class RPCSignerTest(BitcoinTestFramework): assert_equal({'fingerprint': '00000001', 'name': 'trezor_t'} in self.nodes[1].enumeratesigners()['signers'], True) if __name__ == '__main__': - RPCSignerTest().main() + RPCSignerTest(__file__).main() diff --git a/test/functional/rpc_signmessagewithprivkey.py b/test/functional/rpc_signmessagewithprivkey.py index c5df22157d2..8e866987818 100755 --- a/test/functional/rpc_signmessagewithprivkey.py +++ b/test/functional/rpc_signmessagewithprivkey.py @@ -60,4 +60,4 @@ class SignMessagesWithPrivTest(BitcoinTestFramework): if __name__ == '__main__': - SignMessagesWithPrivTest().main() + SignMessagesWithPrivTest(__file__).main() diff --git a/test/functional/rpc_signrawtransactionwithkey.py b/test/functional/rpc_signrawtransactionwithkey.py index f4fec13495f..9dae0ba9942 100755 --- a/test/functional/rpc_signrawtransactionwithkey.py +++ b/test/functional/rpc_signrawtransactionwithkey.py @@ -143,4 +143,4 @@ class SignRawTransactionWithKeyTest(BitcoinTestFramework): if __name__ == '__main__': - SignRawTransactionWithKeyTest().main() + SignRawTransactionWithKeyTest(__file__).main() diff --git a/test/functional/rpc_txoutproof.py b/test/functional/rpc_txoutproof.py index 60b7ce8d20e..387132b6809 100755 --- a/test/functional/rpc_txoutproof.py +++ b/test/functional/rpc_txoutproof.py @@ -104,4 +104,4 @@ class MerkleBlockTest(BitcoinTestFramework): # verify that the proofs are invalid if __name__ == '__main__': - MerkleBlockTest().main() + MerkleBlockTest(__file__).main() diff --git a/test/functional/rpc_uptime.py b/test/functional/rpc_uptime.py index f8df59d02ad..fdf459953c0 100755 --- a/test/functional/rpc_uptime.py +++ b/test/functional/rpc_uptime.py @@ -32,4 +32,4 @@ class UptimeTest(BitcoinTestFramework): if __name__ == '__main__': - UptimeTest().main() + UptimeTest(__file__).main() diff --git a/test/functional/rpc_users.py b/test/functional/rpc_users.py index 153493fbabc..44187ce7905 100755 --- a/test/functional/rpc_users.py +++ b/test/functional/rpc_users.py @@ -156,4 +156,4 @@ class HTTPBasicsTest(BitcoinTestFramework): if __name__ == '__main__': - HTTPBasicsTest().main() + HTTPBasicsTest(__file__).main() diff --git a/test/functional/rpc_validateaddress.py b/test/functional/rpc_validateaddress.py index d87ba098c3f..dde07e7eadd 100755 --- a/test/functional/rpc_validateaddress.py +++ b/test/functional/rpc_validateaddress.py @@ -200,4 +200,4 @@ class ValidateAddressMainTest(BitcoinTestFramework): if __name__ == "__main__": - ValidateAddressMainTest().main() + ValidateAddressMainTest(__file__).main() diff --git a/test/functional/rpc_whitelist.py b/test/functional/rpc_whitelist.py index fb404fb4794..5f74fe82742 100755 --- a/test/functional/rpc_whitelist.py +++ b/test/functional/rpc_whitelist.py @@ -93,4 +93,4 @@ class RPCWhitelistTest(BitcoinTestFramework): assert_equal(200, rpccall(self.nodes[0], self.strange_users[4], "getblockcount").status) if __name__ == "__main__": - RPCWhitelistTest().main() + RPCWhitelistTest(__file__).main() diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 9e44a11143f..3887cc8545a 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -92,7 +92,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): This class also contains various public and private helper methods.""" - def __init__(self) -> None: + def __init__(self, test_file) -> None: """Sets test framework defaults. Do not override this method. Instead, override the set_test_params() method""" self.chain: str = 'regtest' self.setup_clean_chain: bool = False diff --git a/test/functional/tool_signet_miner.py b/test/functional/tool_signet_miner.py index 1ad2a579bfb..bdefb92ae62 100755 --- a/test/functional/tool_signet_miner.py +++ b/test/functional/tool_signet_miner.py @@ -62,4 +62,4 @@ class SignetMinerTest(BitcoinTestFramework): if __name__ == "__main__": - SignetMinerTest().main() + SignetMinerTest(__file__).main() diff --git a/test/functional/tool_wallet.py b/test/functional/tool_wallet.py index dcf74f6075e..784a7698829 100755 --- a/test/functional/tool_wallet.py +++ b/test/functional/tool_wallet.py @@ -563,4 +563,4 @@ class ToolWalletTest(BitcoinTestFramework): self.test_dump_very_large_records() if __name__ == '__main__': - ToolWalletTest().main() + ToolWalletTest(__file__).main() diff --git a/test/functional/wallet_abandonconflict.py b/test/functional/wallet_abandonconflict.py index dda48aae1ba..ce0f4d099b5 100755 --- a/test/functional/wallet_abandonconflict.py +++ b/test/functional/wallet_abandonconflict.py @@ -241,4 +241,4 @@ class AbandonConflictTest(BitcoinTestFramework): assert_equal(newbalance, balance - Decimal("20")) if __name__ == '__main__': - AbandonConflictTest().main() + AbandonConflictTest(__file__).main() diff --git a/test/functional/wallet_address_types.py b/test/functional/wallet_address_types.py index 6b27b32dea0..e326d3e89e6 100755 --- a/test/functional/wallet_address_types.py +++ b/test/functional/wallet_address_types.py @@ -387,4 +387,4 @@ class AddressTypeTest(BitcoinTestFramework): assert_raises_rpc_error(-8, "Legacy wallets cannot provide bech32m addresses", self.nodes[0].getrawchangeaddress, "bech32m") if __name__ == '__main__': - AddressTypeTest().main() + AddressTypeTest(__file__).main() diff --git a/test/functional/wallet_assumeutxo.py b/test/functional/wallet_assumeutxo.py index 30396da0152..0bce2f137c5 100755 --- a/test/functional/wallet_assumeutxo.py +++ b/test/functional/wallet_assumeutxo.py @@ -164,4 +164,4 @@ class AssumeutxoTest(BitcoinTestFramework): if __name__ == '__main__': - AssumeutxoTest().main() + AssumeutxoTest(__file__).main() diff --git a/test/functional/wallet_avoid_mixing_output_types.py b/test/functional/wallet_avoid_mixing_output_types.py index 66fbf780e56..146b3df3f4d 100755 --- a/test/functional/wallet_avoid_mixing_output_types.py +++ b/test/functional/wallet_avoid_mixing_output_types.py @@ -177,4 +177,4 @@ class AddressInputTypeGrouping(BitcoinTestFramework): if __name__ == '__main__': - AddressInputTypeGrouping().main() + AddressInputTypeGrouping(__file__).main() diff --git a/test/functional/wallet_avoidreuse.py b/test/functional/wallet_avoidreuse.py index 4983bfda7f0..bba79d0a258 100755 --- a/test/functional/wallet_avoidreuse.py +++ b/test/functional/wallet_avoidreuse.py @@ -381,4 +381,4 @@ class AvoidReuseTest(BitcoinTestFramework): if __name__ == '__main__': - AvoidReuseTest().main() + AvoidReuseTest(__file__).main() diff --git a/test/functional/wallet_backup.py b/test/functional/wallet_backup.py index d03b08bcc40..a639c343772 100755 --- a/test/functional/wallet_backup.py +++ b/test/functional/wallet_backup.py @@ -244,4 +244,4 @@ class WalletBackupTest(BitcoinTestFramework): if __name__ == '__main__': - WalletBackupTest().main() + WalletBackupTest(__file__).main() diff --git a/test/functional/wallet_backwards_compatibility.py b/test/functional/wallet_backwards_compatibility.py index ab008a40cdb..e71283b9281 100755 --- a/test/functional/wallet_backwards_compatibility.py +++ b/test/functional/wallet_backwards_compatibility.py @@ -400,4 +400,4 @@ class BackwardsCompatibilityTest(BitcoinTestFramework): assert_equal(info, addr_info) if __name__ == '__main__': - BackwardsCompatibilityTest().main() + BackwardsCompatibilityTest(__file__).main() diff --git a/test/functional/wallet_balance.py b/test/functional/wallet_balance.py index 2c85773bf3a..9da53402a45 100755 --- a/test/functional/wallet_balance.py +++ b/test/functional/wallet_balance.py @@ -339,4 +339,4 @@ class WalletTest(BitcoinTestFramework): assert_equal(tx_info['lastprocessedblock']['hash'], prev_hash) if __name__ == '__main__': - WalletTest().main() + WalletTest(__file__).main() diff --git a/test/functional/wallet_basic.py b/test/functional/wallet_basic.py index 1b2b8ec1f3c..c968e4333a0 100755 --- a/test/functional/wallet_basic.py +++ b/test/functional/wallet_basic.py @@ -818,4 +818,4 @@ class WalletTest(BitcoinTestFramework): if __name__ == '__main__': - WalletTest().main() + WalletTest(__file__).main() diff --git a/test/functional/wallet_blank.py b/test/functional/wallet_blank.py index e646d270059..76f9cb05ee6 100755 --- a/test/functional/wallet_blank.py +++ b/test/functional/wallet_blank.py @@ -160,4 +160,4 @@ class WalletBlankTest(BitcoinTestFramework): if __name__ == '__main__': - WalletBlankTest().main() + WalletBlankTest(__file__).main() diff --git a/test/functional/wallet_bumpfee.py b/test/functional/wallet_bumpfee.py index 6d45adc823d..81c1c8c1b34 100755 --- a/test/functional/wallet_bumpfee.py +++ b/test/functional/wallet_bumpfee.py @@ -854,4 +854,4 @@ def test_bumpfee_with_feerate_ignores_walletincrementalrelayfee(self, rbf_node, if __name__ == "__main__": - BumpFeeTest().main() + BumpFeeTest(__file__).main() diff --git a/test/functional/wallet_change_address.py b/test/functional/wallet_change_address.py index f8bfe9eebf1..07bab82697e 100755 --- a/test/functional/wallet_change_address.py +++ b/test/functional/wallet_change_address.py @@ -105,4 +105,4 @@ class WalletChangeAddressTest(BitcoinTestFramework): self.assert_change_pos(w1, tx, 0) if __name__ == '__main__': - WalletChangeAddressTest().main() + WalletChangeAddressTest(__file__).main() diff --git a/test/functional/wallet_coinbase_category.py b/test/functional/wallet_coinbase_category.py index c2cb0bf3b07..f09ed4913a2 100755 --- a/test/functional/wallet_coinbase_category.py +++ b/test/functional/wallet_coinbase_category.py @@ -60,4 +60,4 @@ class CoinbaseCategoryTest(BitcoinTestFramework): self.assert_category("orphan", address, txid, 100) if __name__ == '__main__': - CoinbaseCategoryTest().main() + CoinbaseCategoryTest(__file__).main() diff --git a/test/functional/wallet_conflicts.py b/test/functional/wallet_conflicts.py index 25a95aa954d..7a950ffae6f 100755 --- a/test/functional/wallet_conflicts.py +++ b/test/functional/wallet_conflicts.py @@ -423,4 +423,4 @@ class TxConflicts(BitcoinTestFramework): carol.unloadwallet() if __name__ == '__main__': - TxConflicts().main() + TxConflicts(__file__).main() diff --git a/test/functional/wallet_create_tx.py b/test/functional/wallet_create_tx.py index 41ddb2bc69e..6deb262c9aa 100755 --- a/test/functional/wallet_create_tx.py +++ b/test/functional/wallet_create_tx.py @@ -129,4 +129,4 @@ class CreateTxWalletTest(BitcoinTestFramework): if __name__ == '__main__': - CreateTxWalletTest().main() + CreateTxWalletTest(__file__).main() diff --git a/test/functional/wallet_createwallet.py b/test/functional/wallet_createwallet.py index 8e07021e036..0232af1658f 100755 --- a/test/functional/wallet_createwallet.py +++ b/test/functional/wallet_createwallet.py @@ -190,4 +190,4 @@ class CreateWalletTest(BitcoinTestFramework): if __name__ == '__main__': - CreateWalletTest().main() + CreateWalletTest(__file__).main() diff --git a/test/functional/wallet_createwalletdescriptor.py b/test/functional/wallet_createwalletdescriptor.py index 18e1703da37..e8cd914769d 100755 --- a/test/functional/wallet_createwalletdescriptor.py +++ b/test/functional/wallet_createwalletdescriptor.py @@ -120,4 +120,4 @@ class WalletCreateDescriptorTest(BitcoinTestFramework): if __name__ == '__main__': - WalletCreateDescriptorTest().main() + WalletCreateDescriptorTest(__file__).main() diff --git a/test/functional/wallet_crosschain.py b/test/functional/wallet_crosschain.py index 4c5d7192ae0..3505d33e513 100755 --- a/test/functional/wallet_crosschain.py +++ b/test/functional/wallet_crosschain.py @@ -62,4 +62,4 @@ class WalletCrossChain(BitcoinTestFramework): if __name__ == '__main__': - WalletCrossChain().main() + WalletCrossChain(__file__).main() diff --git a/test/functional/wallet_descriptor.py b/test/functional/wallet_descriptor.py index cbd3898f92b..5e0ee978921 100755 --- a/test/functional/wallet_descriptor.py +++ b/test/functional/wallet_descriptor.py @@ -282,4 +282,4 @@ class WalletDescriptorTest(BitcoinTestFramework): if __name__ == '__main__': - WalletDescriptorTest().main () + WalletDescriptorTest(__file__).main() diff --git a/test/functional/wallet_disable.py b/test/functional/wallet_disable.py index 9c73f7dead6..da6e5d408f3 100755 --- a/test/functional/wallet_disable.py +++ b/test/functional/wallet_disable.py @@ -28,4 +28,4 @@ class DisableWalletTest (BitcoinTestFramework): if __name__ == '__main__': - DisableWalletTest().main() + DisableWalletTest(__file__).main() diff --git a/test/functional/wallet_dump.py b/test/functional/wallet_dump.py index f50aae0c535..3a4f23a1245 100755 --- a/test/functional/wallet_dump.py +++ b/test/functional/wallet_dump.py @@ -223,4 +223,4 @@ class WalletDumpTest(BitcoinTestFramework): w3.dumpwallet(self.nodes[0].datadir_path / "w3.dump") if __name__ == '__main__': - WalletDumpTest().main() + WalletDumpTest(__file__).main() diff --git a/test/functional/wallet_encryption.py b/test/functional/wallet_encryption.py index b30634010d5..5a5fb3e5be3 100755 --- a/test/functional/wallet_encryption.py +++ b/test/functional/wallet_encryption.py @@ -102,4 +102,4 @@ class WalletEncryptionTest(BitcoinTestFramework): if __name__ == '__main__': - WalletEncryptionTest().main() + WalletEncryptionTest(__file__).main() diff --git a/test/functional/wallet_fallbackfee.py b/test/functional/wallet_fallbackfee.py index f0740b72fdd..1849a602abd 100755 --- a/test/functional/wallet_fallbackfee.py +++ b/test/functional/wallet_fallbackfee.py @@ -32,4 +32,4 @@ class WalletRBFTest(BitcoinTestFramework): assert_raises_rpc_error(-6, "Fee estimation failed", lambda: self.nodes[0].sendmany("", {self.nodes[0].getnewaddress(): 1})) if __name__ == '__main__': - WalletRBFTest().main() + WalletRBFTest(__file__).main() diff --git a/test/functional/wallet_fast_rescan.py b/test/functional/wallet_fast_rescan.py index 1315bccafdc..4ac441516e5 100755 --- a/test/functional/wallet_fast_rescan.py +++ b/test/functional/wallet_fast_rescan.py @@ -99,4 +99,4 @@ class WalletFastRescanTest(BitcoinTestFramework): if __name__ == '__main__': - WalletFastRescanTest().main() + WalletFastRescanTest(__file__).main() diff --git a/test/functional/wallet_fundrawtransaction.py b/test/functional/wallet_fundrawtransaction.py index 07737c273d0..827f27b431c 100755 --- a/test/functional/wallet_fundrawtransaction.py +++ b/test/functional/wallet_fundrawtransaction.py @@ -1523,4 +1523,4 @@ class RawTransactionsTest(BitcoinTestFramework): wallet.unloadwallet() if __name__ == '__main__': - RawTransactionsTest().main() + RawTransactionsTest(__file__).main() diff --git a/test/functional/wallet_gethdkeys.py b/test/functional/wallet_gethdkeys.py index f09b8c875a5..b6edc29fe61 100755 --- a/test/functional/wallet_gethdkeys.py +++ b/test/functional/wallet_gethdkeys.py @@ -182,4 +182,4 @@ class WalletGetHDKeyTest(BitcoinTestFramework): if __name__ == '__main__': - WalletGetHDKeyTest().main() + WalletGetHDKeyTest(__file__).main() diff --git a/test/functional/wallet_groups.py b/test/functional/wallet_groups.py index 26477131cf2..8d6c96c0e00 100755 --- a/test/functional/wallet_groups.py +++ b/test/functional/wallet_groups.py @@ -182,4 +182,4 @@ class WalletGroupTest(BitcoinTestFramework): if __name__ == '__main__': - WalletGroupTest().main() + WalletGroupTest(__file__).main() diff --git a/test/functional/wallet_hd.py b/test/functional/wallet_hd.py index 52161043eac..8f2a5fc78b4 100755 --- a/test/functional/wallet_hd.py +++ b/test/functional/wallet_hd.py @@ -280,4 +280,4 @@ class WalletHDTest(BitcoinTestFramework): if __name__ == '__main__': - WalletHDTest().main() + WalletHDTest(__file__).main() diff --git a/test/functional/wallet_implicitsegwit.py b/test/functional/wallet_implicitsegwit.py index baa9bafb00d..e5787c03049 100755 --- a/test/functional/wallet_implicitsegwit.py +++ b/test/functional/wallet_implicitsegwit.py @@ -65,4 +65,4 @@ class ImplicitSegwitTest(BitcoinTestFramework): check_implicit_transactions(implicit_keys, self.nodes[0]) if __name__ == '__main__': - ImplicitSegwitTest().main() + ImplicitSegwitTest(__file__).main() diff --git a/test/functional/wallet_import_rescan.py b/test/functional/wallet_import_rescan.py index 2a9435b3706..c5834c15d20 100755 --- a/test/functional/wallet_import_rescan.py +++ b/test/functional/wallet_import_rescan.py @@ -338,4 +338,4 @@ class ImportRescanTest(BitcoinTestFramework): if __name__ == "__main__": - ImportRescanTest().main() + ImportRescanTest(__file__).main() diff --git a/test/functional/wallet_import_with_label.py b/test/functional/wallet_import_with_label.py index 0a1fc31ebc5..9d01dfa5b76 100755 --- a/test/functional/wallet_import_with_label.py +++ b/test/functional/wallet_import_with_label.py @@ -125,4 +125,4 @@ class ImportWithLabel(BitcoinTestFramework): if __name__ == "__main__": - ImportWithLabel().main() + ImportWithLabel(__file__).main() diff --git a/test/functional/wallet_importdescriptors.py b/test/functional/wallet_importdescriptors.py index f9d05a2fe40..6a69377c634 100755 --- a/test/functional/wallet_importdescriptors.py +++ b/test/functional/wallet_importdescriptors.py @@ -709,4 +709,4 @@ class ImportDescriptorsTest(BitcoinTestFramework): assert_equal(temp_wallet.getbalance(), encrypted_wallet.getbalance()) if __name__ == '__main__': - ImportDescriptorsTest().main() + ImportDescriptorsTest(__file__).main() diff --git a/test/functional/wallet_importmulti.py b/test/functional/wallet_importmulti.py index 31013f6323f..42b470bb976 100755 --- a/test/functional/wallet_importmulti.py +++ b/test/functional/wallet_importmulti.py @@ -898,4 +898,4 @@ class ImportMultiTest(BitcoinTestFramework): if __name__ == '__main__': - ImportMultiTest().main() + ImportMultiTest(__file__).main() diff --git a/test/functional/wallet_importprunedfunds.py b/test/functional/wallet_importprunedfunds.py index b3ae22cc445..467fddeb590 100755 --- a/test/functional/wallet_importprunedfunds.py +++ b/test/functional/wallet_importprunedfunds.py @@ -143,4 +143,4 @@ class ImportPrunedFundsTest(BitcoinTestFramework): if __name__ == '__main__': - ImportPrunedFundsTest().main() + ImportPrunedFundsTest(__file__).main() diff --git a/test/functional/wallet_inactive_hdchains.py b/test/functional/wallet_inactive_hdchains.py index c6d22ab90b4..3b0c09c02be 100755 --- a/test/functional/wallet_inactive_hdchains.py +++ b/test/functional/wallet_inactive_hdchains.py @@ -146,4 +146,4 @@ class InactiveHDChainsTest(BitcoinTestFramework): if __name__ == '__main__': - InactiveHDChainsTest().main() + InactiveHDChainsTest(__file__).main() diff --git a/test/functional/wallet_keypool.py b/test/functional/wallet_keypool.py index 6ed8572347d..d3b6ca1ed11 100755 --- a/test/functional/wallet_keypool.py +++ b/test/functional/wallet_keypool.py @@ -223,4 +223,4 @@ class KeyPoolTest(BitcoinTestFramework): assert_raises_rpc_error(-4, msg, w2.keypoolrefill, 100) if __name__ == '__main__': - KeyPoolTest().main() + KeyPoolTest(__file__).main() diff --git a/test/functional/wallet_keypool_topup.py b/test/functional/wallet_keypool_topup.py index e1bd85d8a99..25028d87bfa 100755 --- a/test/functional/wallet_keypool_topup.py +++ b/test/functional/wallet_keypool_topup.py @@ -98,4 +98,4 @@ class KeypoolRestoreTest(BitcoinTestFramework): if __name__ == '__main__': - KeypoolRestoreTest().main() + KeypoolRestoreTest(__file__).main() diff --git a/test/functional/wallet_labels.py b/test/functional/wallet_labels.py index f074339a2bd..307e10ae34d 100755 --- a/test/functional/wallet_labels.py +++ b/test/functional/wallet_labels.py @@ -256,4 +256,4 @@ def change_label(node, address, old_label, new_label): new_label.verify(node) if __name__ == '__main__': - WalletLabelsTest().main() + WalletLabelsTest(__file__).main() diff --git a/test/functional/wallet_listdescriptors.py b/test/functional/wallet_listdescriptors.py index 712b881322d..c9d6c1f190d 100755 --- a/test/functional/wallet_listdescriptors.py +++ b/test/functional/wallet_listdescriptors.py @@ -136,4 +136,4 @@ class ListDescriptorsTest(BitcoinTestFramework): if __name__ == '__main__': - ListDescriptorsTest().main() + ListDescriptorsTest(__file__).main() diff --git a/test/functional/wallet_listreceivedby.py b/test/functional/wallet_listreceivedby.py index d0f1336a5eb..522c7732fef 100755 --- a/test/functional/wallet_listreceivedby.py +++ b/test/functional/wallet_listreceivedby.py @@ -263,4 +263,4 @@ class ReceivedByTest(BitcoinTestFramework): if __name__ == '__main__': - ReceivedByTest().main() + ReceivedByTest(__file__).main() diff --git a/test/functional/wallet_listsinceblock.py b/test/functional/wallet_listsinceblock.py index 15214539a97..d777212f96c 100755 --- a/test/functional/wallet_listsinceblock.py +++ b/test/functional/wallet_listsinceblock.py @@ -505,4 +505,4 @@ class ListSinceBlockTest(BitcoinTestFramework): if __name__ == '__main__': - ListSinceBlockTest().main() + ListSinceBlockTest(__file__).main() diff --git a/test/functional/wallet_listtransactions.py b/test/functional/wallet_listtransactions.py index c820eaa6f60..a9f2066dd19 100755 --- a/test/functional/wallet_listtransactions.py +++ b/test/functional/wallet_listtransactions.py @@ -330,4 +330,4 @@ class ListTransactionsTest(BitcoinTestFramework): if __name__ == '__main__': - ListTransactionsTest().main() + ListTransactionsTest(__file__).main() diff --git a/test/functional/wallet_migration.py b/test/functional/wallet_migration.py index 8fdc284d241..b4dc163e341 100755 --- a/test/functional/wallet_migration.py +++ b/test/functional/wallet_migration.py @@ -1032,4 +1032,4 @@ class WalletMigrationTest(BitcoinTestFramework): self.test_blank() if __name__ == '__main__': - WalletMigrationTest().main() + WalletMigrationTest(__file__).main() diff --git a/test/functional/wallet_miniscript.py b/test/functional/wallet_miniscript.py index 67e12839020..064eac499b2 100755 --- a/test/functional/wallet_miniscript.py +++ b/test/functional/wallet_miniscript.py @@ -401,4 +401,4 @@ class WalletMiniscriptTest(BitcoinTestFramework): if __name__ == "__main__": - WalletMiniscriptTest().main() + WalletMiniscriptTest(__file__).main() diff --git a/test/functional/wallet_multisig_descriptor_psbt.py b/test/functional/wallet_multisig_descriptor_psbt.py index 145912025f0..2e0b0d1a41b 100755 --- a/test/functional/wallet_multisig_descriptor_psbt.py +++ b/test/functional/wallet_multisig_descriptor_psbt.py @@ -154,4 +154,4 @@ class WalletMultisigDescriptorPSBTTest(BitcoinTestFramework): if __name__ == "__main__": - WalletMultisigDescriptorPSBTTest().main() + WalletMultisigDescriptorPSBTTest(__file__).main() diff --git a/test/functional/wallet_multiwallet.py b/test/functional/wallet_multiwallet.py index ee866ee59ba..156f4279b43 100755 --- a/test/functional/wallet_multiwallet.py +++ b/test/functional/wallet_multiwallet.py @@ -423,4 +423,4 @@ class MultiWalletTest(BitcoinTestFramework): if __name__ == '__main__': - MultiWalletTest().main() + MultiWalletTest(__file__).main() diff --git a/test/functional/wallet_orphanedreward.py b/test/functional/wallet_orphanedreward.py index 451f8abb0a5..8a02781f26c 100755 --- a/test/functional/wallet_orphanedreward.py +++ b/test/functional/wallet_orphanedreward.py @@ -73,4 +73,4 @@ class OrphanedBlockRewardTest(BitcoinTestFramework): if __name__ == '__main__': - OrphanedBlockRewardTest().main() + OrphanedBlockRewardTest(__file__).main() diff --git a/test/functional/wallet_pruning.py b/test/functional/wallet_pruning.py index 6e252b54062..9c34a24be95 100755 --- a/test/functional/wallet_pruning.py +++ b/test/functional/wallet_pruning.py @@ -155,4 +155,4 @@ class WalletPruningTest(BitcoinTestFramework): self.test_wallet_import_pruned_with_missing_blocks(wallet_birthheight_1) if __name__ == '__main__': - WalletPruningTest().main() + WalletPruningTest(__file__).main() diff --git a/test/functional/wallet_reindex.py b/test/functional/wallet_reindex.py index 5388de4b717..6778f76efc0 100755 --- a/test/functional/wallet_reindex.py +++ b/test/functional/wallet_reindex.py @@ -105,4 +105,4 @@ class WalletReindexTest(BitcoinTestFramework): if __name__ == '__main__': - WalletReindexTest().main() + WalletReindexTest(__file__).main() diff --git a/test/functional/wallet_reorgsrestore.py b/test/functional/wallet_reorgsrestore.py index 4271f3e481e..77cf34898bd 100755 --- a/test/functional/wallet_reorgsrestore.py +++ b/test/functional/wallet_reorgsrestore.py @@ -101,4 +101,4 @@ class ReorgsRestoreTest(BitcoinTestFramework): assert conflicting["blockhash"] != conflicted_after_reorg["blockhash"] if __name__ == '__main__': - ReorgsRestoreTest().main() + ReorgsRestoreTest(__file__).main() diff --git a/test/functional/wallet_rescan_unconfirmed.py b/test/functional/wallet_rescan_unconfirmed.py index ad9fa081c21..69ad522b5d3 100755 --- a/test/functional/wallet_rescan_unconfirmed.py +++ b/test/functional/wallet_rescan_unconfirmed.py @@ -80,4 +80,4 @@ class WalletRescanUnconfirmed(BitcoinTestFramework): assert_equal(w1.gettransaction(tx_child_unconfirmed_sweep["txid"])["confirmations"], 0) if __name__ == '__main__': - WalletRescanUnconfirmed().main() + WalletRescanUnconfirmed(__file__).main() diff --git a/test/functional/wallet_resendwallettransactions.py b/test/functional/wallet_resendwallettransactions.py index f61e1edc1de..49c8ef1c5fe 100755 --- a/test/functional/wallet_resendwallettransactions.py +++ b/test/functional/wallet_resendwallettransactions.py @@ -149,4 +149,4 @@ class ResendWalletTransactionsTest(BitcoinTestFramework): if __name__ == '__main__': - ResendWalletTransactionsTest().main() + ResendWalletTransactionsTest(__file__).main() diff --git a/test/functional/wallet_send.py b/test/functional/wallet_send.py index bbb0d658d96..2d0aad3b5d6 100755 --- a/test/functional/wallet_send.py +++ b/test/functional/wallet_send.py @@ -612,4 +612,4 @@ class WalletSendTest(BitcoinTestFramework): if __name__ == '__main__': - WalletSendTest().main() + WalletSendTest(__file__).main() diff --git a/test/functional/wallet_sendall.py b/test/functional/wallet_sendall.py index 1d308c225d9..b256b53b38a 100755 --- a/test/functional/wallet_sendall.py +++ b/test/functional/wallet_sendall.py @@ -531,4 +531,4 @@ class SendallTest(BitcoinTestFramework): self.sendall_fails_with_transaction_too_large() if __name__ == '__main__': - SendallTest().main() + SendallTest(__file__).main() diff --git a/test/functional/wallet_sendmany.py b/test/functional/wallet_sendmany.py index 57519931433..ad99100590b 100755 --- a/test/functional/wallet_sendmany.py +++ b/test/functional/wallet_sendmany.py @@ -40,4 +40,4 @@ class SendmanyTest(BitcoinTestFramework): if __name__ == '__main__': - SendmanyTest().main() + SendmanyTest(__file__).main() diff --git a/test/functional/wallet_signer.py b/test/functional/wallet_signer.py index abfc3c1ba1b..52b4c390b83 100755 --- a/test/functional/wallet_signer.py +++ b/test/functional/wallet_signer.py @@ -263,4 +263,4 @@ class WalletSignerTest(BitcoinTestFramework): assert_raises_rpc_error(-1, "GetExternalSigner: More than one external signer found", self.nodes[1].createwallet, wallet_name='multi_hww', disable_private_keys=True, descriptors=True, external_signer=True) if __name__ == '__main__': - WalletSignerTest().main() + WalletSignerTest(__file__).main() diff --git a/test/functional/wallet_signmessagewithaddress.py b/test/functional/wallet_signmessagewithaddress.py index 4a4b818bd1a..170c883ca40 100755 --- a/test/functional/wallet_signmessagewithaddress.py +++ b/test/functional/wallet_signmessagewithaddress.py @@ -45,4 +45,4 @@ class SignMessagesWithAddressTest(BitcoinTestFramework): if __name__ == '__main__': - SignMessagesWithAddressTest().main() + SignMessagesWithAddressTest(__file__).main() diff --git a/test/functional/wallet_signrawtransactionwithwallet.py b/test/functional/wallet_signrawtransactionwithwallet.py index 612a2542e74..eb0e4097fed 100755 --- a/test/functional/wallet_signrawtransactionwithwallet.py +++ b/test/functional/wallet_signrawtransactionwithwallet.py @@ -310,4 +310,4 @@ class SignRawTransactionWithWalletTest(BitcoinTestFramework): if __name__ == '__main__': - SignRawTransactionWithWalletTest().main() + SignRawTransactionWithWalletTest(__file__).main() diff --git a/test/functional/wallet_simulaterawtx.py b/test/functional/wallet_simulaterawtx.py index 545aad892cb..11b7a4c76e2 100755 --- a/test/functional/wallet_simulaterawtx.py +++ b/test/functional/wallet_simulaterawtx.py @@ -129,4 +129,4 @@ class SimulateTxTest(BitcoinTestFramework): assert_raises_rpc_error(-8, "One or more transaction inputs are missing or have been spent already", w2.simulaterawtransaction, [tx1, tx2]) if __name__ == '__main__': - SimulateTxTest().main() + SimulateTxTest(__file__).main() diff --git a/test/functional/wallet_spend_unconfirmed.py b/test/functional/wallet_spend_unconfirmed.py index bfcdeaeaa89..4c73e0970b4 100755 --- a/test/functional/wallet_spend_unconfirmed.py +++ b/test/functional/wallet_spend_unconfirmed.py @@ -505,4 +505,4 @@ class UnconfirmedInputTest(BitcoinTestFramework): self.test_external_input_unconfirmed_low() if __name__ == '__main__': - UnconfirmedInputTest().main() + UnconfirmedInputTest(__file__).main() diff --git a/test/functional/wallet_startup.py b/test/functional/wallet_startup.py index 2cc4e312afa..6feb00af8e1 100755 --- a/test/functional/wallet_startup.py +++ b/test/functional/wallet_startup.py @@ -58,4 +58,4 @@ class WalletStartupTest(BitcoinTestFramework): assert_equal(set(self.nodes[0].listwallets()), set(('w2', 'w3'))) if __name__ == '__main__': - WalletStartupTest().main() + WalletStartupTest(__file__).main() diff --git a/test/functional/wallet_taproot.py b/test/functional/wallet_taproot.py index a5d7445ce8d..a88d84f4c6b 100755 --- a/test/functional/wallet_taproot.py +++ b/test/functional/wallet_taproot.py @@ -507,4 +507,4 @@ class WalletTaprootTest(BitcoinTestFramework): ) if __name__ == '__main__': - WalletTaprootTest().main() + WalletTaprootTest(__file__).main() diff --git a/test/functional/wallet_timelock.py b/test/functional/wallet_timelock.py index 0a622979a49..6c88438330a 100755 --- a/test/functional/wallet_timelock.py +++ b/test/functional/wallet_timelock.py @@ -50,4 +50,4 @@ class WalletLocktimeTest(BitcoinTestFramework): if __name__ == "__main__": - WalletLocktimeTest().main() + WalletLocktimeTest(__file__).main() diff --git a/test/functional/wallet_transactiontime_rescan.py b/test/functional/wallet_transactiontime_rescan.py index ea999920848..fb6dc74dc53 100755 --- a/test/functional/wallet_transactiontime_rescan.py +++ b/test/functional/wallet_transactiontime_rescan.py @@ -223,4 +223,4 @@ class TransactionTimeRescanTest(BitcoinTestFramework): assert_equal(encrypted_wallet.getbalance(), temp_wallet.getbalance()) if __name__ == '__main__': - TransactionTimeRescanTest().main() + TransactionTimeRescanTest(__file__).main() diff --git a/test/functional/wallet_txn_clone.py b/test/functional/wallet_txn_clone.py index 1f3b6f2ce92..a2dd223aed6 100755 --- a/test/functional/wallet_txn_clone.py +++ b/test/functional/wallet_txn_clone.py @@ -149,4 +149,4 @@ class TxnMallTest(BitcoinTestFramework): if __name__ == '__main__': - TxnMallTest().main() + TxnMallTest(__file__).main() diff --git a/test/functional/wallet_txn_doublespend.py b/test/functional/wallet_txn_doublespend.py index 3cd0cd3207d..3d6830f1f35 100755 --- a/test/functional/wallet_txn_doublespend.py +++ b/test/functional/wallet_txn_doublespend.py @@ -138,4 +138,4 @@ class TxnMallTest(BitcoinTestFramework): if __name__ == '__main__': - TxnMallTest().main() + TxnMallTest(__file__).main() diff --git a/test/functional/wallet_upgradewallet.py b/test/functional/wallet_upgradewallet.py index a4f2a9b74dd..7d1d244dffd 100755 --- a/test/functional/wallet_upgradewallet.py +++ b/test/functional/wallet_upgradewallet.py @@ -360,4 +360,4 @@ class UpgradeWalletTest(BitcoinTestFramework): self.test_upgradewallet(disabled_wallet, previous_version=169900, expected_version=169900) if __name__ == '__main__': - UpgradeWalletTest().main() + UpgradeWalletTest(__file__).main() diff --git a/test/functional/wallet_watchonly.py b/test/functional/wallet_watchonly.py index b473f5d65c1..298d50d4524 100755 --- a/test/functional/wallet_watchonly.py +++ b/test/functional/wallet_watchonly.py @@ -111,4 +111,4 @@ class CreateWalletWatchonlyTest(BitcoinTestFramework): if __name__ == '__main__': - CreateWalletWatchonlyTest().main() + CreateWalletWatchonlyTest(__file__).main() From 9bf7ca6cad888d460f57d249264dc0062025bb3f Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 13 Jul 2024 12:31:19 +0100 Subject: [PATCH 2/3] qa: Consider `cache` and `config.ini` relative to invocation directory In CMake-based build system (1) `config.ini` is created in the build directory, and (2) `cache` must also be created in the same directory. This change enables running individual functional tests from the build directory. --- test/functional/test_framework/test_framework.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 3887cc8545a..49212eb0195 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -103,7 +103,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): self.rpc_timeout = 60 # Wait for up to 60 seconds for the RPC server to respond self.supports_cli = True self.bind_to_localhost_only = True - self.parse_args() + self.parse_args(test_file) self.default_wallet_name = "default_wallet" if self.options.descriptors else "" self.wallet_data_filename = "wallet.dat" # Optional list of wallet names that can be set in set_test_params to @@ -155,14 +155,14 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): exit_code = self.shutdown() sys.exit(exit_code) - def parse_args(self): + def parse_args(self, test_file): previous_releases_path = os.getenv("PREVIOUS_RELEASES_DIR") or os.getcwd() + "/releases" parser = argparse.ArgumentParser(usage="%(prog)s [options]") parser.add_argument("--nocleanup", dest="nocleanup", default=False, action="store_true", help="Leave bitcoinds and test.* datadir on exit or error") parser.add_argument("--noshutdown", dest="noshutdown", default=False, action="store_true", help="Don't stop bitcoinds after the test execution") - parser.add_argument("--cachedir", dest="cachedir", default=os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + "/../../cache"), + parser.add_argument("--cachedir", dest="cachedir", default=os.path.abspath(os.path.dirname(test_file) + "/../cache"), help="Directory for caching pregenerated datadirs (default: %(default)s)") parser.add_argument("--tmpdir", dest="tmpdir", help="Root directory for datadirs (must not exist)") parser.add_argument("-l", "--loglevel", dest="loglevel", default="INFO", @@ -177,7 +177,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): parser.add_argument("--coveragedir", dest="coveragedir", help="Write tested RPC commands into this directory") parser.add_argument("--configfile", dest="configfile", - default=os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + "/../../config.ini"), + default=os.path.abspath(os.path.dirname(test_file) + "/../config.ini"), help="Location of the test framework config file (default: %(default)s)") parser.add_argument("--pdbonfailure", dest="pdbonfailure", default=False, action="store_true", help="Attach a python debugger if test fails") From a8e3af1a82dd584a1cc3ffbe587e66889f72e3c7 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 8 Jun 2024 23:58:40 +0100 Subject: [PATCH 3/3] qa: Do not assume running `feature_asmap.py` from source directory --- test/functional/feature_asmap.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/functional/feature_asmap.py b/test/functional/feature_asmap.py index cbff028bcc3..53e94bf4dfb 100755 --- a/test/functional/feature_asmap.py +++ b/test/functional/feature_asmap.py @@ -30,7 +30,7 @@ from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal DEFAULT_ASMAP_FILENAME = 'ip_asn.map' # defined in src/init.cpp -ASMAP = '../../src/test/data/asmap.raw' # path to unit test skeleton asmap +ASMAP = 'src/test/data/asmap.raw' # path to unit test skeleton asmap VERSION = 'fec61fa21a9f46f3b17bdcd660d7f4cd90b966aad3aec593c99b35f0aca15853' def expected_messages(filename): @@ -133,7 +133,8 @@ class AsmapTest(BitcoinTestFramework): self.node = self.nodes[0] self.datadir = self.node.chain_path self.default_asmap = os.path.join(self.datadir, DEFAULT_ASMAP_FILENAME) - self.asmap_raw = os.path.join(os.path.dirname(os.path.realpath(__file__)), ASMAP) + base_dir = self.config["environment"]["SRCDIR"] + self.asmap_raw = os.path.join(base_dir, ASMAP) self.test_without_asmap_arg() self.test_asmap_with_absolute_path()