Skip to content

Commit de2967a

Browse files
committed
Remove hypothesis upper pin, bound filter values to MAX_UINT_256
1 parent 8403305 commit de2967a

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"pytest-xdist>=2.4.0",
3333
"pytest>=7.0.0",
3434
"flaky>=3.7.0",
35-
"hypothesis>=3.31.2,<6.131.1",
35+
"hypothesis>=3.31.2",
3636
"tox>=4.0.0",
3737
"mypy==1.10.0",
3838
"pre-commit>=3.4.0",

tests/core/filtering/test_contract_data_filters.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,21 @@ def dynamic_values(draw):
3737
}
3838

3939

40+
MAX_UINT_256 = 2**256 - 1
41+
42+
4043
@st.composite
4144
def fixed_values(draw):
42-
non_matching_1 = draw(st.integers(min_value=0))
43-
non_matching_2 = draw(st.integers(min_value=0))
44-
non_matching_3 = draw(st.integers(min_value=0))
45-
non_matching_4 = draw(st.integers(min_value=0))
45+
non_matching_1 = draw(st.integers(min_value=0, max_value=MAX_UINT_256))
46+
non_matching_2 = draw(st.integers(min_value=0, max_value=MAX_UINT_256))
47+
non_matching_3 = draw(st.integers(min_value=0, max_value=MAX_UINT_256))
48+
non_matching_4 = draw(st.integers(min_value=0, max_value=MAX_UINT_256))
4649
exclusions = (non_matching_1, non_matching_2, non_matching_3, non_matching_4)
4750
matching_values = draw(
4851
st.lists(
49-
elements=st.integers(min_value=0).filter(lambda x: x not in exclusions),
52+
elements=st.integers(min_value=0, max_value=MAX_UINT_256).filter(
53+
lambda x: x not in exclusions
54+
),
5055
min_size=4,
5156
max_size=4,
5257
)

0 commit comments

Comments
 (0)