Skip to content

Commit 46a49e3

Browse files
author
Hugo Osvaldo Barrera
authored
Merge pull request #900 from pimutils/more-git-optimizations
Optimize another very slow test
2 parents 910317d + 5e36ca1 commit 46a49e3

File tree

1 file changed

+7
-29
lines changed

1 file changed

+7
-29
lines changed

tests/system/cli/test_sync.py

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
import sys
33
from textwrap import dedent
44

5-
import hypothesis.strategies as st
65
import pytest
7-
from hypothesis import settings
86

97

108
def test_simple_run(tmpdir, runner):
@@ -299,42 +297,22 @@ def get_cfg():
299297
}
300298

301299

302-
collections_strategy = st.sets(
303-
st.text(
304-
st.characters(
305-
blacklist_characters=set("./\x00"), # Invalid chars on POSIX filesystems
306-
# Surrogates can't be encoded to utf-8 in Python
307-
blacklist_categories={"Cs"},
308-
),
309-
min_size=1,
310-
max_size=50,
311-
),
312-
min_size=1,
313-
)
314-
315-
316300
# XXX: https://github.com/pimutils/vdirsyncer/issues/617
317301
@pytest.mark.skipif(sys.platform == "darwin", reason="This test inexplicably fails")
318302
@pytest.mark.parametrize(
319303
"collections",
320304
[
321-
("persönlich",),
322-
(
323-
"a",
324-
"A",
325-
),
305+
("a", "A"),
326306
("\ufffe",),
327-
]
328-
+ [
329-
collections_strategy.example()
330-
for _ in range(settings.get_profile(settings._current_profile).max_examples)
307+
("Hello there!",),
308+
("Österreich",),
309+
("中国", "x1"),
310+
("한글",),
311+
("42a4ec99-b1c2-4859-b142-759112f2ca50",),
312+
("فلسطين",),
331313
],
332314
)
333315
def test_create_collections(collections, tmpdir, runner):
334-
# Hypothesis calls this tests in a way that fixtures are not reset, to tmpdir is the
335-
# same for each call.
336-
# This horrible hack creates a new subdirectory on each run, effectively giving us a
337-
# new tmpdir each run.
338316

339317
runner.write_with_general(
340318
dedent(

0 commit comments

Comments
 (0)