forked from pool/python-textdistance
Accepting request 983583 from home:bnavigator:branches:devel:languages:python
- More than one test can timeout * Drop extend-timeout.patch * Add hypothesis-profile-conftest.patch OBS-URL: https://build.opensuse.org/request/show/983583 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textdistance?expand=0&rev=9
This commit is contained in:
@@ -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(),
|
|
13
hypothesis-profile-conftest.patch
Normal file
13
hypothesis-profile-conftest.patch
Normal file
@@ -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]
|
||||||
|
+)
|
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Jun 18 14:19:44 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- 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
|
Tue Mar 1 12:20:22 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@@ -16,19 +16,16 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
%define skip_python36 1
|
|
||||||
Name: python-textdistance
|
Name: python-textdistance
|
||||||
Version: 4.2.1
|
Version: 4.2.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Compute distance between the two texts
|
Summary: Compute distance between the two texts
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/life4/textdistance
|
URL: https://github.com/life4/textdistance
|
||||||
Source: https://github.com/life4/textdistance/archive/refs/tags/v.%{version}.tar.gz
|
Source: https://github.com/life4/textdistance/archive/refs/tags/v.%{version}.tar.gz#/python-textdistance-%{version}.tar.gz
|
||||||
# PATCH-FIX-OPENSUSE extend-timeout.patch bsc#[0-9]+ mcepl@suse.com
|
# PATCH-FEATURE-OPENSUSE hypothesis-profile-conftest.patch -- add hypothesis profile for slow OBS executions, code@bnavigator.de
|
||||||
# extend timetout for failing test
|
Patch1: hypothesis-profile-conftest.patch
|
||||||
Patch0: extend-timeout.patch
|
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@@ -53,7 +50,6 @@ implementation, common interface, optional external libs usage.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n textdistance-v.%{version}
|
%autosetup -p1 -n textdistance-v.%{version}
|
||||||
|
|
||||||
chmod a-x README.md
|
chmod a-x README.md
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@@ -65,7 +61,7 @@ chmod a-x README.md
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
# we don't have all external libraries to test with
|
# we don't have all external libraries to test with
|
||||||
%pytest -m "not external"
|
%pytest -m "not external" --hypothesis-profile obs
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
|
Reference in New Issue
Block a user