test: prep manual equality assert conversions

The later scripted diff only handles plain `assert x == y` lines.
Some remaining tests still use equality inside comprehensions, parenthesized asserts, and other shapes that the line-based rewrite would misread.
Rewrite those sites by hand first so the later mechanical conversion stays safe.
The commit also simplifies the dead `len(["errors"]) == 0` branch in `blocktools.py`, which can never be true.
This commit is contained in:
Lőrinc
2026-03-08 21:22:43 +00:00
parent 4f4516e3f6
commit dcd90fbe54
16 changed files with 49 additions and 34 deletions

View File

@@ -146,7 +146,8 @@ class TxConflicts(BitcoinTestFramework):
unspents = alice.listunspent()
assert_equal(len(unspents), 3)
assert all([tx["amount"] == 25 for tx in unspents])
for tx in unspents:
assert_equal(tx["amount"], 25)
# tx1 spends unspent[0] and unspent[1]
raw_tx = alice.createrawtransaction(inputs=[unspents[0], unspents[1]], outputs=[{bob.getnewaddress() : 49.9999}])
@@ -336,7 +337,8 @@ class TxConflicts(BitcoinTestFramework):
unspents = alice.listunspent()
assert_equal(len(unspents), 2)
assert all([tx["amount"] == 25 for tx in unspents])
for tx in unspents:
assert_equal(tx["amount"], 25)
assert_equal(alice.getrawmempool(), [])