diff --git a/test-requirements.txt b/test-requirements.txt index bda5f7e..be40a37 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,4 @@ -hypothesis>=5.0.0,<7.0.0 +hypothesis>=6.72.0,<7.0.0 pytest pytest-cov pytest-httpserver diff --git a/tests/__init__.py b/tests/__init__.py index bb65412..2748db7 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -103,10 +103,8 @@ X-SOMETHING:{r} HAHA:YES END:FOO""" -printable_characters_strategy = st.text( - st.characters(blacklist_categories=("Cc", "Cs")) -) +printable_characters_strategy = st.text(st.characters(exclude_categories=("Cc", "Cs"))) uid_strategy = st.text( - st.characters(blacklist_categories=("Zs", "Zl", "Zp", "Cc", "Cs")), min_size=1 + st.characters(exclude_categories=("Zs", "Zl", "Zp", "Cc", "Cs")), min_size=1 ).filter(lambda x: x.strip() == x) diff --git a/tests/conftest.py b/tests/conftest.py index 813deb5..c97630f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -45,7 +45,7 @@ settings.register_profile( "deterministic", settings( derandomize=True, - suppress_health_check=HealthCheck.all(), + suppress_health_check=list(HealthCheck), ), ) settings.register_profile("dev", settings(suppress_health_check=[HealthCheck.too_slow])) diff --git a/tests/unit/test_repair.py b/tests/unit/test_repair.py index 3a4b3cb..9d1e61e 100644 --- a/tests/unit/test_repair.py +++ b/tests/unit/test_repair.py @@ -17,7 +17,7 @@ from vdirsyncer.vobject import Item @given(uid=uid_strategy) # Using the random module for UIDs: -@settings(suppress_health_check=HealthCheck.all()) +@settings(suppress_health_check=list(HealthCheck)) @pytest.mark.asyncio async def test_repair_uids(uid): s = MemoryStorage() @@ -40,7 +40,7 @@ async def test_repair_uids(uid): @given(uid=uid_strategy.filter(lambda x: not href_safe(x))) # Using the random module for UIDs: -@settings(suppress_health_check=HealthCheck.all()) +@settings(suppress_health_check=list(HealthCheck)) @pytest.mark.asyncio async def test_repair_unsafe_uids(uid): s = MemoryStorage() diff --git a/tests/unit/utils/test_vobject.py b/tests/unit/utils/test_vobject.py index 150c92f..6ecff78 100644 --- a/tests/unit/utils/test_vobject.py +++ b/tests/unit/utils/test_vobject.py @@ -299,7 +299,7 @@ def test_input_types(): value_strategy = st.text( st.characters( - blacklist_categories=("Zs", "Zl", "Zp", "Cc", "Cs"), blacklist_characters=":=" + exclude_categories=("Zs", "Zl", "Zp", "Cc", "Cs"), exclude_characters=":=" ), min_size=1, ).filter(lambda x: x.strip() == x)