diff --git a/extend-timeout.patch b/extend-timeout.patch deleted file mode 100644 index fe35f97..0000000 --- a/extend-timeout.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/tests/test_compression/test_common.py -+++ b/tests/test_compression/test_common.py -@@ -32,6 +32,7 @@ def test_monotonicity(alg): - assert same <= similar <= diffirent - - -+@hypothesis.settings(deadline=None) - @pytest.mark.parametrize('alg', ALGS) - @hypothesis.given( - left=hypothesis.strategies.text(), diff --git a/hypothesis-profile-conftest.patch b/hypothesis-profile-conftest.patch new file mode 100644 index 0000000..20f840e --- /dev/null +++ b/hypothesis-profile-conftest.patch @@ -0,0 +1,13 @@ +Index: textdistance-v.4.2.1/tests/conftest.py +=================================================================== +--- /dev/null ++++ textdistance-v.4.2.1/tests/conftest.py +@@ -0,0 +1,8 @@ ++# increase test deadline for slow obs executions ++import hypothesis ++ ++hypothesis.settings.register_profile( ++ 'obs', ++ deadline=5000, ++ suppress_health_check=[hypothesis.HealthCheck.too_slow] ++) diff --git a/v.4.2.1.tar.gz b/python-textdistance-4.2.1.tar.gz similarity index 100% rename from v.4.2.1.tar.gz rename to python-textdistance-4.2.1.tar.gz diff --git a/python-textdistance.changes b/python-textdistance.changes index 7b6ece8..bfa88e8 100644 --- a/python-textdistance.changes +++ b/python-textdistance.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Jun 18 14:19:44 UTC 2022 - Ben Greiner + +- More than one test can timeout + * Drop extend-timeout.patch + * Add hypothesis-profile-conftest.patch + ------------------------------------------------------------------- Tue Mar 1 12:20:22 UTC 2022 - pgajdos@suse.com diff --git a/python-textdistance.spec b/python-textdistance.spec index 963c6ba..f16beb0 100644 --- a/python-textdistance.spec +++ b/python-textdistance.spec @@ -16,19 +16,16 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 -%define skip_python36 1 Name: python-textdistance Version: 4.2.1 Release: 0 Summary: Compute distance between the two texts License: MIT URL: https://github.com/life4/textdistance -Source: https://github.com/life4/textdistance/archive/refs/tags/v.%{version}.tar.gz -# PATCH-FIX-OPENSUSE extend-timeout.patch bsc#[0-9]+ mcepl@suse.com -# extend timetout for failing test -Patch0: extend-timeout.patch +Source: https://github.com/life4/textdistance/archive/refs/tags/v.%{version}.tar.gz#/python-textdistance-%{version}.tar.gz +# PATCH-FEATURE-OPENSUSE hypothesis-profile-conftest.patch -- add hypothesis profile for slow OBS executions, code@bnavigator.de +Patch1: hypothesis-profile-conftest.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -53,7 +50,6 @@ implementation, common interface, optional external libs usage. %prep %autosetup -p1 -n textdistance-v.%{version} - chmod a-x README.md %build @@ -65,7 +61,7 @@ chmod a-x README.md %check # we don't have all external libraries to test with -%pytest -m "not external" +%pytest -m "not external" --hypothesis-profile obs %files %{python_files} %doc README.md