mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-24 14:27:41 +00:00
Reorganize testsuite
The end goal here is to independently measure coverage of each of those testsuites.
This commit is contained in:
parent
c9d78e2391
commit
b2422dbea6
15 changed files with 9 additions and 9 deletions
|
|
@ -8,3 +8,4 @@ norecursedirs = tests/storage/servers/*
|
||||||
# W503: Line break before operator
|
# W503: Line break before operator
|
||||||
ignore = W503, E731
|
ignore = W503, E731
|
||||||
exclude = tests/storage/servers/*, build/
|
exclude = tests/storage/servers/*, build/
|
||||||
|
application-package-names = tests,vdirsyncer
|
||||||
|
|
|
||||||
0
tests/system/cli/__init__.py
Normal file
0
tests/system/cli/__init__.py
Normal file
|
|
@ -5,12 +5,12 @@ from hypothesis import example, given
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from tests import blow_up
|
||||||
|
|
||||||
from vdirsyncer.metasync import MetaSyncConflict, metasync
|
from vdirsyncer.metasync import MetaSyncConflict, metasync
|
||||||
from vdirsyncer.storage.base import normalize_meta_value
|
from vdirsyncer.storage.base import normalize_meta_value
|
||||||
from vdirsyncer.storage.memory import MemoryStorage
|
from vdirsyncer.storage.memory import MemoryStorage
|
||||||
|
|
||||||
from . import blow_up
|
|
||||||
|
|
||||||
|
|
||||||
def test_irrelevant_status():
|
def test_irrelevant_status():
|
||||||
a = MemoryStorage()
|
a = MemoryStorage()
|
||||||
|
|
@ -1,14 +1,13 @@
|
||||||
|
|
||||||
from hypothesis import given, settings
|
from hypothesis import given, settings
|
||||||
|
|
||||||
|
from tests import uid_strategy
|
||||||
|
|
||||||
from vdirsyncer.repair import repair_storage
|
from vdirsyncer.repair import repair_storage
|
||||||
from vdirsyncer.storage.memory import MemoryStorage
|
from vdirsyncer.storage.memory import MemoryStorage
|
||||||
from vdirsyncer.utils import href_safe
|
from vdirsyncer.utils import href_safe
|
||||||
from vdirsyncer.utils.vobject import Item
|
from vdirsyncer.utils.vobject import Item
|
||||||
|
|
||||||
from . import uid_strategy
|
|
||||||
|
|
||||||
|
|
||||||
@given(uid=uid_strategy)
|
@given(uid=uid_strategy)
|
||||||
@settings(perform_health_check=False) # Using the random module for UIDs
|
@settings(perform_health_check=False) # Using the random module for UIDs
|
||||||
|
|
@ -8,14 +8,14 @@ from hypothesis.stateful import Bundle, RuleBasedStateMachine, rule
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from tests import blow_up, uid_strategy
|
||||||
|
|
||||||
import vdirsyncer.exceptions as exceptions
|
import vdirsyncer.exceptions as exceptions
|
||||||
from vdirsyncer.storage.base import Item
|
from vdirsyncer.storage.base import Item
|
||||||
from vdirsyncer.storage.memory import MemoryStorage, _random_string
|
from vdirsyncer.storage.memory import MemoryStorage, _random_string
|
||||||
from vdirsyncer.sync import BothReadOnly, IdentConflict, PartialSync, \
|
from vdirsyncer.sync import BothReadOnly, IdentConflict, PartialSync, \
|
||||||
StorageEmpty, SyncConflict, sync
|
StorageEmpty, SyncConflict, sync
|
||||||
|
|
||||||
from . import blow_up, uid_strategy
|
|
||||||
|
|
||||||
|
|
||||||
def empty_storage(x):
|
def empty_storage(x):
|
||||||
return list(x.list()) == []
|
return list(x.list()) == []
|
||||||
|
|
@ -2,10 +2,11 @@
|
||||||
|
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
|
|
||||||
|
from tests import BARE_EVENT_TEMPLATE, EVENT_TEMPLATE, VCARD_TEMPLATE, \
|
||||||
|
normalize_item
|
||||||
|
|
||||||
import vdirsyncer.utils.vobject as vobject
|
import vdirsyncer.utils.vobject as vobject
|
||||||
|
|
||||||
from .. import BARE_EVENT_TEMPLATE, EVENT_TEMPLATE, VCARD_TEMPLATE, \
|
|
||||||
normalize_item
|
|
||||||
|
|
||||||
_simple_split = [
|
_simple_split = [
|
||||||
VCARD_TEMPLATE.format(r=123, uid=123),
|
VCARD_TEMPLATE.format(r=123, uid=123),
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
Loading…
Reference in a new issue