mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 10:12:28 +02:00
test: create assert_not_equal util and add to where imports are needed
In the functional tests there are lots of cases where we assert != which this new util will replace, we also are adding the imports and the new assertion
This commit is contained in:
@@ -77,6 +77,7 @@ from test_framework.messages import (
|
||||
sha256,
|
||||
)
|
||||
from test_framework.util import (
|
||||
assert_not_equal,
|
||||
MAX_NODES,
|
||||
p2p_port,
|
||||
wait_until_helper_internal,
|
||||
@@ -897,7 +898,7 @@ class P2PDataStore(P2PInterface):
|
||||
if success:
|
||||
self.wait_until(lambda: node.getbestblockhash() == blocks[-1].hash, timeout=timeout)
|
||||
else:
|
||||
assert node.getbestblockhash() != blocks[-1].hash
|
||||
assert_not_equal(node.getbestblockhash(), blocks[-1].hash)
|
||||
|
||||
def send_txs_and_test(self, txs, node, *, success=True, expect_disconnect=False, reject_reason=None):
|
||||
"""Send txs to test node and test whether they're accepted to the mempool.
|
||||
|
||||
Reference in New Issue
Block a user