mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01: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:
@@ -27,6 +27,7 @@ from test_framework.script import (
|
||||
)
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
assert_not_equal,
|
||||
assert_equal,
|
||||
assert_raises_rpc_error,
|
||||
)
|
||||
@@ -275,12 +276,12 @@ class CoinStatsIndexTest(BitcoinTestFramework):
|
||||
res2 = index_node.gettxoutsetinfo(hash_type='muhash', hash_or_height=112)
|
||||
assert_equal(res["bestblock"], block)
|
||||
assert_equal(res["muhash"], res2["muhash"])
|
||||
assert res["muhash"] != res_invalid["muhash"]
|
||||
assert_not_equal(res["muhash"], res_invalid["muhash"])
|
||||
|
||||
# Test that requesting reorged out block by hash is still returning correct results
|
||||
res_invalid2 = index_node.gettxoutsetinfo(hash_type='muhash', hash_or_height=reorg_block)
|
||||
assert_equal(res_invalid2["muhash"], res_invalid["muhash"])
|
||||
assert res["muhash"] != res_invalid2["muhash"]
|
||||
assert_not_equal(res["muhash"], res_invalid2["muhash"])
|
||||
|
||||
# Add another block, so we don't depend on reconsiderblock remembering which
|
||||
# blocks were touched by invalidateblock
|
||||
|
||||
Reference in New Issue
Block a user