Merge bitcoin/bitcoin#29500: test: create assert_not_equal util
7bb83f6718test: create assert_not_equal util and add to where imports are needed (kevkevin) Pull request description: In the functional tests there are lots of cases where we assert != which we now swap with assert_not_equal to be more readable This is motivated/uses logic from this PR which was closed https://github.com/bitcoin/bitcoin/pull/28528 This partially helps https://github.com/bitcoin/bitcoin/issues/23119 I've broken it up to just `assert_not_equal` to keep the PR smaller as suggested in https://github.com/bitcoin/bitcoin/pull/28528#issuecomment-1959945805 I can create follow up PR's if this is wanted ACKs for top commit: hodlinator: re-ACK7bb83f6718ryanofsky: Code review ACK7bb83f6718. Only change since last review is fixing error message formatting and passing it as a keyword argument janb84: Re-ACK [7bb83f6](https://github.com/bitcoin/bitcoin/commit/7bb83f6718110cb3a29e72522fdc5515db21c7d0) Tree-SHA512: de09f41a690033a5b61e6f861d3bd69a32b889d6655a28fbc0d5cfac9f7ec9c642432967d33913970882b4cfdd47bdd377d0ddc44e25976cbaa49f7f9d8f7b10
This commit is contained in:
41 files changed
+137
-83
No files matched your search
@@ -36,6 +36,7 @@ from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
assert_approx,
|
||||
assert_equal,
|
||||
assert_not_equal,
|
||||
assert_raises_rpc_error,
|
||||
ensure_for,
|
||||
sha256sum_file,
|
||||
@@ -476,7 +477,7 @@ class AssumeutxoTest(BitcoinTestFramework):
|
||||
assert_equal(
|
||||
dump_output4['txoutset_hash'],
|
||||
"8a1db0d6e958ce0d7c963bc6fc91ead596c027129bacec68acc40351037b09d7")
|
||||
assert sha256sum_file(dump_output['path']) != sha256sum_file(dump_output4['path'])
|
||||
assert_not_equal(sha256sum_file(dump_output['path']), sha256sum_file(dump_output4['path']))
|
||||
|
||||
# Use a hash instead of a height
|
||||
prev_snap_hash = n0.getblockhash(prev_snap_height)
|
||||
|
||||
Reference in new issue
Block a user