mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-31 08:13:52 +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:
@@ -35,7 +35,8 @@ class ToolBitcoinTest(BitcoinTestFramework):
|
||||
self.add_nodes(self.num_nodes, self.extra_args)
|
||||
node_argv = self.get_binaries().node_argv()
|
||||
self.node_options = [node.args[len(node_argv):] for node in self.nodes]
|
||||
assert all(node.args[:len(node_argv)] == node_argv for node in self.nodes)
|
||||
for node in self.nodes:
|
||||
assert_equal(node.args[:len(node_argv)], node_argv)
|
||||
|
||||
def set_cmd_args(self, node, args):
|
||||
"""Set up node so it will be started through bitcoin wrapper command with specified arguments."""
|
||||
|
||||
Reference in New Issue
Block a user