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
<details><summary>Output examples</summary>
Current assert_equal()-behavior:
2025-03-28T21:15:36.379000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
File "/home/hodlinator/bitcoin/test/functional/test_framework/test_framework.py", line 178, in main
self.run_test()
File "/home/hodlinator/bitcoin/./build/test/functional/wallet_multisig_descriptor_psbt.py", line 80, in run_test
assert_equal(
File "/home/hodlinator/bitcoin/test/functional/test_framework/util.py", line 77, in assert_equal
raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args))
AssertionError: not(0 == 123)
With first commit, chomping off util.py traceback entry you complained about:
2025-03-28T21:16:19.814000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
File "/home/hodlinator/bitcoin/test/functional/test_framework/test_framework.py", line 178, in main
self.run_test()
File "/home/hodlinator/bitcoin/./build/test/functional/wallet_multisig_descriptor_psbt.py", line 80, in run_test
assert_equal(
AssertionError: not(0 == 123)
With second commit, replacing another traceback entry with proper context:
2025-03-28T21:17:39.494000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
File "/home/hodlinator/bitcoin/test/functional/test_framework/test_framework.py", line 178, in main
self.run_test()
AssertionError: not(0 == 123)
Failing expression: /home/hodlinator/bitcoin/./build/test/functional/wallet_multisig_descriptor_psbt.py:80 - 83
assert_equal(
123 if (False and
True) else 0,
123)
</details>
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.