mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Update hypothesis
This commit is contained in:
parent
e2d3c1add7
commit
a26d3bb58c
3 changed files with 7 additions and 6 deletions
|
|
@ -1,4 +1,4 @@
|
|||
hypothesis>=3.1,<4.0
|
||||
hypothesis>=5.0.0
|
||||
pytest
|
||||
pytest-localserver
|
||||
pytest-subtesthack
|
||||
|
|
|
|||
|
|
@ -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':
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue