From a26d3bb58cc7989e8befee41a517b0f02c3b9b9f Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Mon, 8 Jun 2020 18:24:46 +0200 Subject: [PATCH] Update hypothesis --- test-requirements.txt | 2 +- tests/conftest.py | 3 +-- tests/unit/test_repair.py | 8 +++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index d05994c..feb39a6 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,4 @@ -hypothesis>=3.1,<4.0 +hypothesis>=5.0.0 pytest pytest-localserver pytest-subtesthack diff --git a/tests/conftest.py b/tests/conftest.py index eb8ffac..6afe38e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -34,8 +34,7 @@ settings.register_profile("ci", settings( )) settings.register_profile("deterministic", settings( derandomize=True, - perform_health_check=False, - suppress_health_check=[HealthCheck.too_slow], + suppress_health_check=HealthCheck.all(), )) if os.environ.get('DETERMINISTIC_TESTS', 'false').lower() == 'true': diff --git a/tests/unit/test_repair.py b/tests/unit/test_repair.py index 0ba726e..912b77d 100644 --- a/tests/unit/test_repair.py +++ b/tests/unit/test_repair.py @@ -1,4 +1,4 @@ -from hypothesis import given, settings +from hypothesis import HealthCheck, given, settings import pytest @@ -11,7 +11,8 @@ from vdirsyncer.vobject import Item @given(uid=uid_strategy) -@settings(perform_health_check=False) # Using the random module for UIDs +# Using the random module for UIDs: +@settings(suppress_health_check=HealthCheck.all()) def test_repair_uids(uid): s = MemoryStorage() s.items = { @@ -35,7 +36,8 @@ def test_repair_uids(uid): @given(uid=uid_strategy.filter(lambda x: not href_safe(x))) -@settings(perform_health_check=False) # Using the random module for UIDs +# Using the random module for UIDs: +@settings(suppress_health_check=HealthCheck.all()) def test_repair_unsafe_uids(uid): s = MemoryStorage() item = Item(u'BEGIN:VCARD\nUID:{}\nEND:VCARD'.format(uid))