Skip to content

Commit 67a2aa0

Browse files
committed
test: create assert_less_than 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 following commit will add the new assertion
1 parent 1ffbd96 commit 67a2aa0

16 files changed

+29
-3
lines changed

test/functional/feature_block.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
from test_framework.test_framework import BitcoinTestFramework
5252
from test_framework.util import (
5353
assert_equal,
54+
assert_less_than,
5455
assert_greater_than,
5556
)
5657
from test_framework.wallet_util import generate_keypair

test/functional/feature_coinstatsindex.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from test_framework.test_framework import BitcoinTestFramework
2929
from test_framework.util import (
3030
assert_equal,
31+
assert_less_than,
3132
assert_raises_rpc_error,
3233
)
3334
from test_framework.wallet import (

test/functional/feature_rbf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from test_framework.test_framework import BitcoinTestFramework
1515
from test_framework.util import (
1616
assert_equal,
17+
assert_less_than,
1718
assert_raises_rpc_error,
1819
)
1920
from test_framework.wallet import MiniWallet

test/functional/mempool_resurrect.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
"""Test resurrection of mined transactions when the blockchain is re-organized."""
66

77
from test_framework.test_framework import BitcoinTestFramework
8-
from test_framework.util import assert_equal
8+
from test_framework.util import (
9+
assert_equal,
10+
assert_less_than,
11+
)
912
from test_framework.wallet import MiniWallet
1013

1114

test/functional/p2p_addr_relay.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from test_framework.test_framework import BitcoinTestFramework
2424
from test_framework.util import (
2525
assert_equal,
26+
assert_less_than,
2627
assert_greater_than,
2728
assert_greater_than_or_equal
2829
)

test/functional/p2p_segwit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
from test_framework.test_framework import BitcoinTestFramework
8585
from test_framework.util import (
8686
assert_equal,
87+
assert_less_than,
8788
softfork_active,
8889
assert_raises_rpc_error,
8990
)

test/functional/p2p_sendtxrcncl.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
P2P_VERSION,
2020
)
2121
from test_framework.test_framework import BitcoinTestFramework
22-
from test_framework.util import assert_equal
22+
from test_framework.util import (
23+
assert_equal,
24+
assert_less_than,
25+
)
2326

2427
class PeerNoVerack(P2PInterface):
2528
def __init__(self, wtxidrelay=True):

test/functional/rpc_blockchain.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
from test_framework.test_framework import BitcoinTestFramework
4444
from test_framework.util import (
4545
assert_equal,
46+
assert_less_than,
4647
assert_greater_than,
4748
assert_greater_than_or_equal,
4849
assert_raises,

test/functional/rpc_createmultisig.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from test_framework.util import (
1818
assert_raises_rpc_error,
1919
assert_equal,
20+
assert_less_than,
2021
)
2122
from test_framework.wallet_util import generate_keypair
2223
from test_framework.wallet import (

test/functional/test_framework/blocktools.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
keys_to_multisig_script,
4444
script_to_p2wsh_script,
4545
)
46-
from .util import assert_equal
46+
from .util import (
47+
assert_equal,
48+
assert_less_than,
49+
)
4750

4851
WITNESS_SCALE_FACTOR = 4
4952
MAX_BLOCK_SIGOPS = 20000

0 commit comments

Comments
 (0)