We’re in Python here though. I spent a couple of hours with an LLM in mid-February to brute force this embryo:
https://github.com/bitcoin/bitcoin/compare/master...hodlinator:bitcoin:2025/02/assert_ergonomics
Current assert_equal()
-behavior:
02025-03-28T21:15:36.379000Z TestFramework (ERROR): Assertion failed
1Traceback (most recent call last):
2 File "/home/hodlinator/bitcoin/test/functional/test_framework/test_framework.py", line 178, in main
3 self.run_test()
4 File "/home/hodlinator/bitcoin/./build/test/functional/wallet_multisig_descriptor_psbt.py", line 80, in run_test
5 assert_equal(
6 File "/home/hodlinator/bitcoin/test/functional/test_framework/util.py", line 77, in assert_equal
7 raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args))
8AssertionError: not(0 == 123)
With first commit, chomping off util.py traceback entry you complained about:
02025-03-28T21:16:19.814000Z TestFramework (ERROR): Assertion failed
1Traceback (most recent call last):
2 File "/home/hodlinator/bitcoin/test/functional/test_framework/test_framework.py", line 178, in main
3 self.run_test()
4 File "/home/hodlinator/bitcoin/./build/test/functional/wallet_multisig_descriptor_psbt.py", line 80, in run_test
5 assert_equal(
6AssertionError: not(0 == 123)
With second commit, replacing another traceback entry with proper context:
02025-03-28T21:17:39.494000Z TestFramework (ERROR): Assertion failed
1Traceback (most recent call last):
2 File "/home/hodlinator/bitcoin/test/functional/test_framework/test_framework.py", line 178, in main
3 self.run_test()
4AssertionError: not(0 == 123)
5Failing expression: /home/hodlinator/bitcoin/./build/test/functional/wallet_multisig_descriptor_psbt.py:80 - 83
6 assert_equal(
7 123 if (False and
8 True) else 0,
9 123)
The code needs more work, should be more defensive, forgot to output function name (run_test). And I wouldn’t bet on it being accepted anyway.