Update hypothesis

This commit is contained in:
Hugo Osvaldo Barrera 2020-06-08 18:24:46 +02:00
parent e2d3c1add7
commit a26d3bb58c
3 changed files with 7 additions and 6 deletions

View file

@ -1,4 +1,4 @@
hypothesis>=3.1,<4.0 hypothesis>=5.0.0
pytest pytest
pytest-localserver pytest-localserver
pytest-subtesthack pytest-subtesthack

View file

@ -34,8 +34,7 @@ settings.register_profile("ci", settings(
)) ))
settings.register_profile("deterministic", settings( settings.register_profile("deterministic", settings(
derandomize=True, derandomize=True,
perform_health_check=False, suppress_health_check=HealthCheck.all(),
suppress_health_check=[HealthCheck.too_slow],
)) ))
if os.environ.get('DETERMINISTIC_TESTS', 'false').lower() == 'true': if os.environ.get('DETERMINISTIC_TESTS', 'false').lower() == 'true':

View file

@ -1,4 +1,4 @@
from hypothesis import given, settings from hypothesis import HealthCheck, given, settings
import pytest import pytest
@ -11,7 +11,8 @@ from vdirsyncer.vobject import Item
@given(uid=uid_strategy) @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): def test_repair_uids(uid):
s = MemoryStorage() s = MemoryStorage()
s.items = { s.items = {
@ -35,7 +36,8 @@ def test_repair_uids(uid):
@given(uid=uid_strategy.filter(lambda x: not href_safe(x))) @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): def test_repair_unsafe_uids(uid):
s = MemoryStorage() s = MemoryStorage()
item = Item(u'BEGIN:VCARD\nUID:{}\nEND:VCARD'.format(uid)) item = Item(u'BEGIN:VCARD\nUID:{}\nEND:VCARD'.format(uid))