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:
kevkevin authored and kevkevinpal committed 2025-04-01 08:39:24 -04:00
1 parent 930b237f16
commit 7bb83f6718
41 files changed
+137 -83

No files matched your search

+5 -2
View File
@@ -19,7 +19,10 @@ from test_framework.p2p import (
P2P_VERSION,
)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal
from test_framework.util import (
assert_equal,
assert_not_equal,
)
class PeerNoVerack(P2PInterface):
def __init__(self, wtxidrelay=True):
@@ -119,7 +122,7 @@ class SendTxRcnclTest(BitcoinTestFramework):
no_txrelay_version_msg.relay = 0
peer.send_without_ping(no_txrelay_version_msg)
peer.wait_for_verack()
assert peer.nServices & NODE_BLOOM != 0
assert_not_equal(peer.nServices & NODE_BLOOM, 0)
assert not peer.sendtxrcncl_msg_received
self.nodes[0].disconnect_p2ps()