elements/test/functional/test_framework
merge-script b7ee5fb8a5 Merge bitcoin/bitcoin#33001: test: Do not pass tests on unhandled exceptions
faa3e684118bffa7a98cf76eeeb59243219df900 test: Log KeyboardInterrupt as exception (MarcoFalke)
fa30b34026f76a5b8af997152fced2d281782e0d test: Do not pass tests on unhandled exceptions (MarcoFalke)

Pull request description:

  Currently the functional tests are problematic, because they pass, even if they encounter an unhanded exception.

  Fix this by handling all exceptions: Catch `BaseException` as fallback and mark it as failure.

  Can be tested via:

  ```diff
  diff --git a/test/functional/wallet_disable.py b/test/functional/wallet_disable.py
  index da6e5d408f..ecc41fb041 100755
  --- a/test/functional/wallet_disable.py
  +++ b/test/functional/wallet_disable.py
  @@ -19,6 +19,7 @@ class DisableWalletTest (BitcoinTestFramework):
           self.wallet_names = []

       def run_test (self):
  +        import sys;sys.exit("fatal error")
           # Make sure wallet is really disabled
           assert_raises_rpc_error(-32601, 'Method not found', self.nodes[0].getwalletinfo)
           x = self.nodes[0].validateaddress('3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy')
  ```

  Previously, the test would pass. With this patch, it would fail.

ACKs for top commit:
  enirox001:
    Looks good to me—ACK faa3e68
  stickies-v:
    re-ACK faa3e684118bffa7a98cf76eeeb59243219df900
  pablomartin4btc:
    tACK faa3e684118bffa7a98cf76eeeb59243219df900

Tree-SHA512: 11ecd5201982e2c776e48d98834b17c15a415306a95524bc702daeba20a316aac797748e9592be8db575597804f149ee7ef104416037cc9e5891758625810e2d
2025-11-25 16:25:39 +00:00
..
__init__.py
address.py Merge 7164e00e1b into merged_master (Bitcoin PR bitcoin/bitcoin#24324) 2023-06-30 17:34:42 +00:00
authproxy.py test: Remove Windows workaround in authproxy 2021-09-25 09:33:16 +02:00
bdb.py scripted-diff: Bump copyright headers 2021-11-10 11:10:24 +01:00
bip340_test_vectors.csv tests: add BIP340 Schnorr signature support to test framework 2020-10-12 17:18:47 -07:00
blocktools.py Merge 807169e10b into merged_master (Bitcoin PR bitcoin/bitcoin#24035) 2023-06-20 09:57:58 +00:00
coverage.py scripted-diff: Bump copyright headers 2021-11-10 11:10:24 +01:00
descriptors.py Output a descriptor in createmultisig and addmultisigaddress 2020-01-30 23:55:36 -05:00
key.py Merge 5ccab7187b into merged_master (Bitcoin PR bitcoin/bitcoin#23394) 2023-05-26 09:14:20 +00:00
liquid_addr.py fix len check in blech32 decode() in test framework 2019-09-13 20:24:23 +05:00
messages.py Merge 807169e10b into merged_master (Bitcoin PR bitcoin/bitcoin#24035) 2023-06-20 09:57:58 +00:00
muhash.py test: Change MuHash Python implementation to match cpp version again 2020-12-22 01:48:34 +01:00
netutil.py test: remove import socket in test_ipv6_local 2022-02-14 19:27:33 -03:00
p2p.py Merge 63c0d0e937 into merged_master (Bitcoin PR bitcoin/bitcoin#21327) 2023-06-01 05:27:06 +00:00
ripemd160.py Add pure Python RIPEMD-160 2021-12-08 14:29:34 -05:00
script.py Add Simplicity Deployment structure 2024-10-07 14:39:10 -04:00
script_util.py scripted-diff: Bump copyright headers 2021-11-10 11:10:24 +01:00
segwit_addr.py Use Bech32m encoding for v1+ segwit addresses 2021-08-17 22:32:47 +00:00
siphash.py
socks5.py scripted-diff: Update copyright in ./test 2019-03-02 10:58:35 -05:00
test_framework.py Merge bitcoin/bitcoin#33001: test: Do not pass tests on unhandled exceptions 2025-11-25 16:25:39 +00:00
test_node.py Merge 267917f563 into merged_master (Bitcoin PR bitcoin/bitcoin#23304) 2023-07-03 10:06:51 +00:00
test_shell.py TestShell: Return self from setup() 2019-11-05 12:55:52 +01:00
util.py Merge eca694a4e7 into merged_master (Bitcoin PR bitcoin/bitcoin#24239) 2023-06-30 10:01:50 +00:00
wallet.py Re-activate assertion which was disabled in the merge of bitcoin/bitcoin#23371 in 2110cca 2023-08-01 10:28:20 +02:00
wallet_util.py Merge ffdab41f94 into merged_master (Bitcoin PR bitcoin/bitcoin#23474) 2023-05-26 10:32:04 +00:00