From 05d0418dc22a2cc844b50b66c444569e5b5f179d8b0c2288b2278391167bded9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 28 Feb 2018 11:12:02 +0000 Subject: [PATCH] Accepting request 580918 from home:sebix:branches:devel:languages:python - add remove_hypothesis_tests.patch to remove hypothesis-based tests and fix tests in build environment OBS-URL: https://build.opensuse.org/request/show/580918 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-binaryornot?expand=0&rev=10 --- python-binaryornot.changes | 5 +++++ python-binaryornot.spec | 5 ++++- remove_hypothesis_tests.patch | 25 +++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 remove_hypothesis_tests.patch diff --git a/python-binaryornot.changes b/python-binaryornot.changes index 8269e08..09e1101 100644 --- a/python-binaryornot.changes +++ b/python-binaryornot.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 28 10:49:07 UTC 2018 - sebix+novell.com@sebix.at + +- add remove_hypothesis_tests.patch to remove hypothesis-based tests and fix tests in build environment + ------------------------------------------------------------------- Mon Sep 11 18:43:53 UTC 2017 - toddrme2178@gmail.com diff --git a/python-binaryornot.spec b/python-binaryornot.spec index 23f5552..1643cbf 100644 --- a/python-binaryornot.spec +++ b/python-binaryornot.spec @@ -1,7 +1,7 @@ # # spec file for package python-binaryornot # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,8 @@ License: BSD-3-Clause Group: Development/Languages/Python Url: https://github.com/audreyr/binaryornot Source: https://files.pythonhosted.org/packages/source/b/binaryornot/binaryornot-%{version}.tar.gz +# PATCH-FIX-OPENSUSE remove_hypothesis_tests.patch -- remove hypothesis-based tests +Patch0: remove_hypothesis_tests.patch BuildRequires: %{python_module chardet >= 3.0.2} BuildRequires: %{python_module devel} BuildRequires: %{python_module hypothesis} @@ -50,6 +52,7 @@ by eliben. %prep %setup -q -n binaryornot-%{version} +%patch0 -p1 %build %python_build diff --git a/remove_hypothesis_tests.patch b/remove_hypothesis_tests.patch new file mode 100644 index 0000000..33a1671 --- /dev/null +++ b/remove_hypothesis_tests.patch @@ -0,0 +1,25 @@ +--- binaryornot-0.4.4/tests/test_check.py 2017-08-03 17:51:33.000000000 +0200 ++++ binaryornot-0.4.4/tests/test_check.py 2018-02-28 11:44:58.436858172 +0100 +@@ -20,9 +20,6 @@ + from contextlib import contextmanager + from tempfile import mkstemp + +-from hypothesis import given +-from hypothesis.strategies import binary +- + from binaryornot.check import is_binary + + +@@ -215,12 +212,5 @@ + os.unlink(f) + + +-class TestDetectionProperties(unittest.TestCase): +- @given(binary(average_size=512)) +- def test_never_crashes(self, data): +- with bytes_in_file(data) as f: +- is_binary(f) +- +- + if __name__ == '__main__': + unittest.main()