Revert use of hypothesis

This commit is contained in:
Markus Unterwaditzer 2018-01-21 23:22:22 +01:00
parent 45d76c889c
commit 82f47737a0
2 changed files with 10 additions and 26 deletions

View file

@ -1,9 +1,7 @@
import pytest
import json
from textwrap import dedent
import hypothesis.strategies as st
from hypothesis import given
from vdirsyncer import exceptions
from vdirsyncer.storage.base import Storage
@ -176,7 +174,8 @@ def test_null_collection_with_named_collection(tmpdir, runner):
assert 'HAHA' in bar.read()
@given(a_requires=st.booleans(), b_requires=st.booleans())
@pytest.mark.parametrize('a_requires,b_requires',
[(x, y) for x in (0, 1) for y in (0, 1)])
def test_collection_required(a_requires, b_requires, tmpdir, runner,
monkeypatch):

View file

@ -4,9 +4,6 @@ import json
import sys
from textwrap import dedent
import hypothesis.strategies as st
from hypothesis import example, given
import pytest
from tests import format_item
@ -275,25 +272,13 @@ def test_multiple_pairs(tmpdir, runner):
# XXX: https://github.com/pimutils/vdirsyncer/issues/617
@pytest.mark.skipif(sys.platform == 'darwin',
reason='This test inexplicably fails')
@given(collections=st.sets(
st.text(
st.characters(
blacklist_characters=set(
u'./\x00' # Invalid chars on POSIX filesystems
),
# Surrogates can't be encoded to utf-8 in Python
blacklist_categories=set(['Cs'])
),
min_size=1,
max_size=50
),
min_size=1
))
@example(collections=[u'persönlich'])
@example(collections={'a', 'A'})
@example(collections={'\ufffe'})
@pytest.mark.xfail(sys.platform == 'darwin',
reason='This test inexplicably fails')
@pytest.mark.parametrize('collections', [
{'persönlich'},
{'a', 'A'},
{'\ufffe'},
])
def test_create_collections(subtest, collections):
@subtest