mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Horrible, nasty hack
This commit is contained in:
parent
9df587df26
commit
53878f001a
2 changed files with 36 additions and 29 deletions
|
|
@ -2,4 +2,3 @@ hypothesis>=5.0.0
|
|||
pytest
|
||||
pytest-cov
|
||||
pytest-localserver
|
||||
pytest-subtesthack
|
||||
|
|
|
|||
|
|
@ -271,6 +271,9 @@ def test_multiple_pairs(tmpdir, runner):
|
|||
}
|
||||
|
||||
|
||||
hack = 0
|
||||
|
||||
|
||||
# XXX: https://github.com/pimutils/vdirsyncer/issues/617
|
||||
@pytest.mark.skipif(sys.platform == 'darwin',
|
||||
reason='This test inexplicably fails')
|
||||
|
|
@ -291,10 +294,15 @@ def test_multiple_pairs(tmpdir, runner):
|
|||
@example(collections=['persönlich'])
|
||||
@example(collections={'a', 'A'})
|
||||
@example(collections={'\ufffe'})
|
||||
def test_create_collections(subtest, collections):
|
||||
def test_create_collections(collections, tmpdir, runner):
|
||||
# Hypothesis calls this tests in a way that fixtures are not reset, to tmpdir is the
|
||||
# same for each call.
|
||||
# This horrible hack creates a new subdirectory on each run, effectively giving us a
|
||||
# new tmpdir each run.
|
||||
global hack
|
||||
hack += 1
|
||||
tmpdir = tmpdir / f"sub{hack}"
|
||||
|
||||
@subtest
|
||||
def test_inner(tmpdir, runner):
|
||||
runner.write_with_general(dedent('''
|
||||
[pair foobar]
|
||||
a = "foo"
|
||||
|
|
|
|||
Loading…
Reference in a new issue