From 2e4fc7c65a97d0665465c56590101849651717ad Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Sat, 12 Jun 2021 18:30:44 +0200 Subject: [PATCH 1/2] Drop unecessary hypothesis usage This adds A LOT of time to test execution, for little benefit. While having random data is good, in reality, most of it was just numbers, and we rarely got very diverse data. These hand-picked samples are as good to catch any regressions or issues with servers. --- tests/storage/__init__.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/storage/__init__.py b/tests/storage/__init__.py index 73eeee3..d68aacc 100644 --- a/tests/storage/__init__.py +++ b/tests/storage/__init__.py @@ -5,12 +5,10 @@ from urllib.parse import quote as urlquote from urllib.parse import unquote as urlunquote import pytest -from hypothesis import settings from .. import assert_item_equals from .. import EVENT_TEMPLATE from .. import normalize_item -from .. import printable_characters_strategy from .. import TASK_TEMPLATE from .. import VCARD_TEMPLATE from vdirsyncer import exceptions @@ -297,10 +295,15 @@ class StorageTests: @pytest.mark.parametrize( "value", - [None] - + [ - printable_characters_strategy.example() - for _ in range(settings.get_profile(settings._current_profile).max_examples) + [ + None, + "", + "Hello there!", + "Österreich", + "中国", + "한글", + "42a4ec99-b1c2-4859-b142-759112f2ca50", + "فلسطين", ], ) def test_metadata_normalization(self, requires_metadata, s, value): From 29c2b6bb4b85477202bd4d9d2118f34ceeaf212f Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Sat, 12 Jun 2021 17:53:37 +0200 Subject: [PATCH 2/2] git-ignore coverage file --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 951face..5848bd2 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ dist docs/_build/ vdirsyncer/version.py .hypothesis +coverage.xml