Reorganize testsuite

The end goal here is to independently measure coverage of each of those
testsuites.
This commit is contained in:
Markus Unterwaditzer 2017-01-18 20:37:54 +01:00
parent c9d78e2391
commit b2422dbea6
15 changed files with 9 additions and 9 deletions

View file

@ -8,3 +8,4 @@ norecursedirs = tests/storage/servers/*
# W503: Line break before operator
ignore = W503, E731
exclude = tests/storage/servers/*, build/
application-package-names = tests,vdirsyncer

View file

View file

@ -5,12 +5,12 @@ from hypothesis import example, given
import pytest
from tests import blow_up
from vdirsyncer.metasync import MetaSyncConflict, metasync
from vdirsyncer.storage.base import normalize_meta_value
from vdirsyncer.storage.memory import MemoryStorage
from . import blow_up
def test_irrelevant_status():
a = MemoryStorage()

View file

@ -1,14 +1,13 @@
from hypothesis import given, settings
from tests import uid_strategy
from vdirsyncer.repair import repair_storage
from vdirsyncer.storage.memory import MemoryStorage
from vdirsyncer.utils import href_safe
from vdirsyncer.utils.vobject import Item
from . import uid_strategy
@given(uid=uid_strategy)
@settings(perform_health_check=False) # Using the random module for UIDs

View file

@ -8,14 +8,14 @@ from hypothesis.stateful import Bundle, RuleBasedStateMachine, rule
import pytest
from tests import blow_up, uid_strategy
import vdirsyncer.exceptions as exceptions
from vdirsyncer.storage.base import Item
from vdirsyncer.storage.memory import MemoryStorage, _random_string
from vdirsyncer.sync import BothReadOnly, IdentConflict, PartialSync, \
StorageEmpty, SyncConflict, sync
from . import blow_up, uid_strategy
def empty_storage(x):
return list(x.list()) == []

View file

@ -2,10 +2,11 @@
from textwrap import dedent
from tests import BARE_EVENT_TEMPLATE, EVENT_TEMPLATE, VCARD_TEMPLATE, \
normalize_item
import vdirsyncer.utils.vobject as vobject
from .. import BARE_EVENT_TEMPLATE, EVENT_TEMPLATE, VCARD_TEMPLATE, \
normalize_item
_simple_split = [
VCARD_TEMPLATE.format(r=123, uid=123),

View file

@ -1 +0,0 @@
# -*- coding: utf-8 -*-