mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-16 10:37:21 +02:00
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:
@@ -673,7 +673,8 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
`[{"txid": txid, "vout": vout1}, {"txid": txid, "vout": vout2}, ...]`.
|
||||
The result can be used to specify inputs for RPCs like `createrawtransaction`,
|
||||
`createpsbt`, `lockunspent` etc."""
|
||||
assert all(len(output.keys()) == 1 for output in outputs)
|
||||
for output in outputs:
|
||||
assert_equal(len(output.keys()), 1)
|
||||
send_res = node.send(outputs)
|
||||
assert send_res["complete"]
|
||||
utxos = []
|
||||
|
||||
Reference in New Issue
Block a user