Skip to content

Commit a26d3bb

Browse files
author
Hugo Osvaldo Barrera
committed
Update hypothesis
1 parent e2d3c1a commit a26d3bb

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
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>=3.1,<4.0
1+
hypothesis>=5.0.0
22
pytest
33
pytest-localserver
44
pytest-subtesthack

tests/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ def benchmark():
3434
))
3535
settings.register_profile("deterministic", settings(
3636
derandomize=True,
37-
perform_health_check=False,
38-
suppress_health_check=[HealthCheck.too_slow],
37+
suppress_health_check=HealthCheck.all(),
3938
))
4039

4140
if os.environ.get('DETERMINISTIC_TESTS', 'false').lower() == 'true':

tests/unit/test_repair.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from hypothesis import given, settings
1+
from hypothesis import HealthCheck, given, settings
22

33
import pytest
44

@@ -11,7 +11,8 @@
1111

1212

1313
@given(uid=uid_strategy)
14-
@settings(perform_health_check=False) # Using the random module for UIDs
14+
# Using the random module for UIDs:
15+
@settings(suppress_health_check=HealthCheck.all())
1516
def test_repair_uids(uid):
1617
s = MemoryStorage()
1718
s.items = {
@@ -35,7 +36,8 @@ def test_repair_uids(uid):
3536

3637

3738
@given(uid=uid_strategy.filter(lambda x: not href_safe(x)))
38-
@settings(perform_health_check=False) # Using the random module for UIDs
39+
# Using the random module for UIDs:
40+
@settings(suppress_health_check=HealthCheck.all())
3941
def test_repair_unsafe_uids(uid):
4042
s = MemoryStorage()
4143
item = Item(u'BEGIN:VCARD\nUID:{}\nEND:VCARD'.format(uid))

0 commit comments

Comments
 (0)