From 853ff014cd005e78db6ddff46178b72bed115867a596c5a92df88318a12214e0 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 10 Aug 2021 12:54:01 +0000 Subject: [PATCH 1/3] Accepting request 911252 from home:mcepl:branches:devel:languages:python - Add hypothesis_settings.patch to allow longer timeouts in OBS. OBS-URL: https://build.opensuse.org/request/show/911252 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyudev?expand=0&rev=42 --- hypothesis_settings.patch | 15 +++++++++++++++ python-pyudev.changes | 5 +++++ python-pyudev.spec | 5 ++++- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 hypothesis_settings.patch diff --git a/hypothesis_settings.patch b/hypothesis_settings.patch new file mode 100644 index 0000000..745b677 --- /dev/null +++ b/hypothesis_settings.patch @@ -0,0 +1,15 @@ +--- + tests/test_enumerate.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tests/test_enumerate.py ++++ b/tests/test_enumerate.py +@@ -126,7 +126,7 @@ class TestEnumerator(object): + + @failed_health_check_wrapper + @given(_CONTEXT_STRATEGY, _SUBSYSTEM_STRATEGY) +- @settings(max_examples=1) ++ @settings(max_examples=1, deadline=500) + def test_match_subsystem_nomatch_complete(self, context, subsystem): + """ + Test that w/ respect to the universe of devices returned by diff --git a/python-pyudev.changes b/python-pyudev.changes index 00576b2..d87ae47 100644 --- a/python-pyudev.changes +++ b/python-pyudev.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 10 12:49:04 UTC 2021 - Matej Cepl + +- Add hypothesis_settings.patch to allow longer timeouts in OBS. + ------------------------------------------------------------------- Sat Dec 12 13:12:21 UTC 2020 - Benjamin Greiner diff --git a/python-pyudev.spec b/python-pyudev.spec index aedbe8d..8e954df 100644 --- a/python-pyudev.spec +++ b/python-pyudev.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyudev # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,6 +30,9 @@ Source0: https://files.pythonhosted.org/packages/source/p/pyudev/pyudev-% Patch0: pytest_register_mark.patch # PATCH-FEATURE_UPSTREAM remove_mock.patch gh#pyudev/pyudev#409 Patch1: remove_mock.patch +# PATCH-FIX-OPENSUS hypothesis_settings.patch bugno mcepl@suse.com +# tests timeout on OBS +Patch2: hypothesis_settings.patch BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: fdupes From e09c2a2dc592d7f2eb026de9b883aaf34518423f5beaa2d2d3ff70cdb5c053ba Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 10 Aug 2021 16:42:40 +0000 Subject: [PATCH 2/3] Update the patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyudev?expand=0&rev=43 --- hypothesis_settings.patch | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hypothesis_settings.patch b/hypothesis_settings.patch index 745b677..7738d82 100644 --- a/hypothesis_settings.patch +++ b/hypothesis_settings.patch @@ -1,9 +1,18 @@ --- - tests/test_enumerate.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + tests/test_enumerate.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) --- a/tests/test_enumerate.py +++ b/tests/test_enumerate.py +@@ -90,7 +90,7 @@ class TestEnumerator(object): + + @failed_health_check_wrapper + @given(_CONTEXT_STRATEGY, _SUBSYSTEM_STRATEGY) +- @settings(max_examples=10) ++ @settings(max_examples=10, deadline=None) + def test_match_subsystem(self, context, subsystem): + """ + Subsystem match matches devices w/ correct subsystem. @@ -126,7 +126,7 @@ class TestEnumerator(object): @failed_health_check_wrapper From 13c086aed225f4c2510ec389df1e91a81d245302ee399bf9783979f41b599466 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 11 Aug 2021 05:47:29 +0000 Subject: [PATCH 3/3] Fix the patch metadata OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyudev?expand=0&rev=44 --- python-pyudev.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pyudev.spec b/python-pyudev.spec index 8e954df..2311f5d 100644 --- a/python-pyudev.spec +++ b/python-pyudev.spec @@ -30,7 +30,7 @@ Source0: https://files.pythonhosted.org/packages/source/p/pyudev/pyudev-% Patch0: pytest_register_mark.patch # PATCH-FEATURE_UPSTREAM remove_mock.patch gh#pyudev/pyudev#409 Patch1: remove_mock.patch -# PATCH-FIX-OPENSUS hypothesis_settings.patch bugno mcepl@suse.com +# PATCH-FIX-OPENSUSE hypothesis_settings.patch mcepl@suse.com # tests timeout on OBS Patch2: hypothesis_settings.patch BuildRequires: %{python_module setuptools}