Skip to content

Commit 688d6f9

Browse files
committed
Update deprecated usages of hypothesis
1 parent 2e7e31f commit 688d6f9

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

test-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
hypothesis>=5.0.0,<7.0.0
1+
hypothesis>=6.72.0,<7.0.0
22
pytest
33
pytest-cov
44
pytest-httpserver

tests/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,8 @@ def assert_item_equals(a, b):
103103
HAHA:YES
104104
END:FOO"""
105105

106-
printable_characters_strategy = st.text(
107-
st.characters(blacklist_categories=("Cc", "Cs"))
108-
)
106+
printable_characters_strategy = st.text(st.characters(exclude_categories=("Cc", "Cs")))
109107

110108
uid_strategy = st.text(
111-
st.characters(blacklist_categories=("Zs", "Zl", "Zp", "Cc", "Cs")), min_size=1
109+
st.characters(exclude_categories=("Zs", "Zl", "Zp", "Cc", "Cs")), min_size=1
112110
).filter(lambda x: x.strip() == x)

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def benchmark():
4545
"deterministic",
4646
settings(
4747
derandomize=True,
48-
suppress_health_check=HealthCheck.all(),
48+
suppress_health_check=list(HealthCheck),
4949
),
5050
)
5151
settings.register_profile("dev", settings(suppress_health_check=[HealthCheck.too_slow]))

tests/unit/test_repair.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
@given(uid=uid_strategy)
1919
# Using the random module for UIDs:
20-
@settings(suppress_health_check=HealthCheck.all())
20+
@settings(suppress_health_check=list(HealthCheck))
2121
@pytest.mark.asyncio
2222
async def test_repair_uids(uid):
2323
s = MemoryStorage()
@@ -40,7 +40,7 @@ async def test_repair_uids(uid):
4040

4141
@given(uid=uid_strategy.filter(lambda x: not href_safe(x)))
4242
# Using the random module for UIDs:
43-
@settings(suppress_health_check=HealthCheck.all())
43+
@settings(suppress_health_check=list(HealthCheck))
4444
@pytest.mark.asyncio
4545
async def test_repair_unsafe_uids(uid):
4646
s = MemoryStorage()

tests/unit/utils/test_vobject.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def test_input_types():
299299

300300
value_strategy = st.text(
301301
st.characters(
302-
blacklist_categories=("Zs", "Zl", "Zp", "Cc", "Cs"), blacklist_characters=":="
302+
exclude_categories=("Zs", "Zl", "Zp", "Cc", "Cs"), exclude_characters=":="
303303
),
304304
min_size=1,
305305
).filter(lambda x: x.strip() == x)

0 commit comments

Comments
 (0)