From a1bae1b53b6e96e656632fee1644c7204c380109a0d98e757f208d67f8f11e6f Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 21 May 2020 14:56:46 +0000 Subject: [PATCH] - Add failing-test_array_values_are_unique_high_collision.patch to avoid failing test on i586 (gh#HypothesisWorks/hypothesis#2447) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=129 --- ...ray_values_are_unique_high_collision.patch | 26 +++++++++++++++++++ python-hypothesis.changes | 6 +++++ python-hypothesis.spec | 5 ++++ 3 files changed, 37 insertions(+) create mode 100644 failing-test_array_values_are_unique_high_collision.patch diff --git a/failing-test_array_values_are_unique_high_collision.patch b/failing-test_array_values_are_unique_high_collision.patch new file mode 100644 index 0000000..d5f3bdb --- /dev/null +++ b/failing-test_array_values_are_unique_high_collision.patch @@ -0,0 +1,26 @@ +--- a/tests/numpy/test_gen_data.py ++++ b/tests/numpy/test_gen_data.py +@@ -13,6 +13,7 @@ + # + # END HEADER + ++import struct + import sys + from functools import reduce + from itertools import zip_longest +@@ -28,6 +29,7 @@ from hypothesis.strategies._internal imp + from tests.common.debug import find_any, minimal + from tests.common.utils import fails_with, flaky + ++_IS_32BIT = 8 * struct.calcsize("P") == 32 + ANY_SHAPE = nps.array_shapes(min_dims=0, max_dims=32, min_side=0, max_side=32) + ANY_NONZERO_SHAPE = nps.array_shapes(min_dims=0, max_dims=32, min_side=1, max_side=32) + STANDARD_TYPES = list( +@@ -361,6 +363,7 @@ def test_cannot_generate_unique_array_of + strat.example() + + ++@pytest.mark.skipif(_IS_32BIT, reason="Test fails on 32bit architecture.") + @given( + nps.arrays( + elements=st.just(0.0), diff --git a/python-hypothesis.changes b/python-hypothesis.changes index 966071b..30e0de1 100644 --- a/python-hypothesis.changes +++ b/python-hypothesis.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 21 14:56:04 UTC 2020 - Matej Cepl + +- Add failing-test_array_values_are_unique_high_collision.patch + to avoid failing test on i586 (gh#HypothesisWorks/hypothesis#2447) + ------------------------------------------------------------------- Sat May 9 16:08:23 UTC 2020 - Arun Persaud diff --git a/python-hypothesis.spec b/python-hypothesis.spec index a4bc830..8b6a8ff 100644 --- a/python-hypothesis.spec +++ b/python-hypothesis.spec @@ -34,6 +34,9 @@ Summary: A library for property based testing License: MPL-2.0 URL: https://github.com/HypothesisWorks/hypothesis-python Source: https://github.com/HypothesisWorks/hypothesis/archive/hypothesis-python-%{version}.tar.gz +# PATCH-FIX-UPSTREAM failing-test_array_values_are_unique_high_collision.patch gh#HypothesisWorks/hypothesis#2447 mcepl@suse.com +# Skip failing test on i586. +Patch0: failing-test_array_values_are_unique_high_collision.patch BuildRequires: %{python_module setuptools >= 36} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -79,6 +82,8 @@ work on Jython or on Python 3.0 through 3.2. %prep %setup -q -n hypothesis-hypothesis-python-%{version}/hypothesis-python +%autopatch -p1 + # the django fails to initialize rm -r tests/django # do not pull in pandas as a dep in ring1; it slows down things too much