2015-11-11 11:36:03 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-hypothesis
|
|
|
|
#
|
2020-04-09 15:45:48 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2015-11-11 11:36:03 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-09-17 15:03:22 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-12-09 11:08:24 +01:00
|
|
|
#
|
2015-11-11 11:36:03 +01:00
|
|
|
|
|
|
|
|
2017-02-24 15:34:42 +01:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
%define oldpython python
|
2018-09-13 16:27:57 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
2019-04-30 15:27:39 +02:00
|
|
|
%define psuffix -test
|
2018-09-13 16:27:57 +02:00
|
|
|
%bcond_without test
|
|
|
|
%else
|
2019-04-30 15:27:39 +02:00
|
|
|
%define psuffix %{nil}
|
2018-09-05 13:17:34 +02:00
|
|
|
%bcond_with test
|
2018-09-13 16:27:57 +02:00
|
|
|
%endif
|
2020-04-09 15:45:48 +02:00
|
|
|
%define skip_python2 1
|
2019-04-30 15:27:39 +02:00
|
|
|
Name: python-hypothesis%{psuffix}
|
2020-05-09 19:32:16 +02:00
|
|
|
Version: 5.11.0
|
2015-11-11 11:36:03 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: A library for property based testing
|
2015-12-09 11:08:24 +01:00
|
|
|
License: MPL-2.0
|
2018-06-07 20:15:11 +02:00
|
|
|
URL: https://github.com/HypothesisWorks/hypothesis-python
|
2018-06-25 13:02:02 +02:00
|
|
|
Source: https://github.com/HypothesisWorks/hypothesis/archive/hypothesis-python-%{version}.tar.gz
|
2020-05-21 16:56:46 +02:00
|
|
|
# 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
|
2018-03-02 12:19:22 +01:00
|
|
|
BuildRequires: %{python_module setuptools >= 36}
|
2017-06-30 09:30:34 +02:00
|
|
|
BuildRequires: fdupes
|
2017-02-24 15:34:42 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-10-16 17:28:26 +02:00
|
|
|
Requires: python-attrs >= 19.2.0
|
2020-04-09 15:45:48 +02:00
|
|
|
Requires: python-sortedcontainers >= 2.1.0
|
Accepting request 797684 from home:apersaud:branches:devel:languages:python
- specfile:
* updated Django version number in requirements
- update to version 5.10.4:
* This patch improves the internals of builds() type inference, to
handle recursive forward references in certain dataclasses. This
is useful for e.g. hypothesmith’s forthcoming LibCST mode.
- changes from version 5.10.3:
* This release reverses the order in which some operations are tried
during shrinking. This should generally be a slight performance
improvement, but most tests are unlikely to notice much
difference.
- changes from version 5.10.2:
* This patch fixes issue #2406, where use of pandas.Timestamp
objects as bounds for the datetimes() strategy caused an internal
error. This bug was introduced in version 5.8.1.
- changes from version 5.10.1:
* This release is a small internal refactoring to how shrinking
interacts with targeted property-based testing that should have no
user user visible impact.
- changes from version 5.10.0:
* This release improves our support for datetimes and times around
DST transitions.
* times() and datetimes() are now sometimes generated with fold=1,
indicating that they represent the second occurrence of a given
wall-time when clocks are set backwards. This may be set even when
there is no transition, in which case the fold value should be
ignored.
For consistency, timezones provided by the pytz package can now
generate imaginary times (such as the hour skipped over when
clocks ‘spring forward’ to daylight saving time, or during some
historical timezone transitions). All other timezones have always
supported generation of imaginary times.
If you prefer the previous behaviour, datetimes() now takes an
argument allow_imaginary which defaults to True but can be set to
False for any timezones strategy.
- changes from version 5.9.1 :
* This patch fixes the rendering of binary() docstring by using the
proper backticks syntax.
- changes from version 5.9.0 :
* Failing tests which use target() now report the highest score
observed for each target alongside the failing example(s), even
without explicitly showing test statistics.
* This improves the debugging workflow for tests of accuracy, which
assert that the total imprecision is within some error budget -
for example, abs(a - b) < 0.5. Previously, shrinking to a minimal
failing example could often make errors seem smaller or more
subtle than they really are (see the threshold problem, and issue
#2180).
- changes from version 5.8.6 :
* This patch improves the docstring of binary(), the repr() of
sampled_from() on an enum.Enum subclass, and a warning in our
pytest plugin. There is no change in runtime behaviour.
- changes from version 5.8.5 :
* This release (potentially very significantly) improves the
performance of failing tests in some rare cases, mostly only
relevant when using targeted property-based testing, by stopping
further optimisation of unrelated test cases once a failing
example is found.
- changes from version 5.8.4 :
* This release fixes issue #2395, where under some circumstances
targeted property-based testing could cause Hypothesis to get
caught in an infinite loop.
- changes from version 5.8.3 :
* This patch teaches builds() and from_type() to use the
__signature__ attribute of classes where it has been set,
improving our support for Pydantic models (in pydantic >= 1.5).
- changes from version 5.8.2 :
* This release improves the performance of the part of the core
engine that deliberately generates duplicate values.
- changes from version 5.8.1 :
* This patch improves dates() shrinking, to simplify year, month,
and day like datetimes() rather than minimizing the number of days
since 2000-01-01.
OBS-URL: https://build.opensuse.org/request/show/797684
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=125
2020-04-25 19:00:42 +02:00
|
|
|
Recommends: python-Django >= 2.2
|
2020-04-09 15:45:48 +02:00
|
|
|
Recommends: python-dpcontracts >= 0.4
|
2019-03-18 09:14:01 +01:00
|
|
|
Recommends: python-lark-parser >= 0.6.5
|
2018-08-31 13:55:52 +02:00
|
|
|
Recommends: python-numpy >= 1.9.0
|
2020-04-09 15:45:48 +02:00
|
|
|
Recommends: python-pandas >= 0.19
|
2019-10-16 17:28:26 +02:00
|
|
|
Recommends: python-pytest >= 4.3.0
|
2020-04-09 15:45:48 +02:00
|
|
|
Recommends: python-python-dateutil >= 1.4
|
2018-09-08 21:49:29 +02:00
|
|
|
Recommends: python-pytz >= 2014.1
|
2018-06-25 13:02:02 +02:00
|
|
|
BuildArch: noarch
|
2019-03-18 09:14:01 +01:00
|
|
|
%if %{with test}
|
2018-06-07 20:15:11 +02:00
|
|
|
# SECTION test requirements
|
Accepting request 797684 from home:apersaud:branches:devel:languages:python
- specfile:
* updated Django version number in requirements
- update to version 5.10.4:
* This patch improves the internals of builds() type inference, to
handle recursive forward references in certain dataclasses. This
is useful for e.g. hypothesmith’s forthcoming LibCST mode.
- changes from version 5.10.3:
* This release reverses the order in which some operations are tried
during shrinking. This should generally be a slight performance
improvement, but most tests are unlikely to notice much
difference.
- changes from version 5.10.2:
* This patch fixes issue #2406, where use of pandas.Timestamp
objects as bounds for the datetimes() strategy caused an internal
error. This bug was introduced in version 5.8.1.
- changes from version 5.10.1:
* This release is a small internal refactoring to how shrinking
interacts with targeted property-based testing that should have no
user user visible impact.
- changes from version 5.10.0:
* This release improves our support for datetimes and times around
DST transitions.
* times() and datetimes() are now sometimes generated with fold=1,
indicating that they represent the second occurrence of a given
wall-time when clocks are set backwards. This may be set even when
there is no transition, in which case the fold value should be
ignored.
For consistency, timezones provided by the pytz package can now
generate imaginary times (such as the hour skipped over when
clocks ‘spring forward’ to daylight saving time, or during some
historical timezone transitions). All other timezones have always
supported generation of imaginary times.
If you prefer the previous behaviour, datetimes() now takes an
argument allow_imaginary which defaults to True but can be set to
False for any timezones strategy.
- changes from version 5.9.1 :
* This patch fixes the rendering of binary() docstring by using the
proper backticks syntax.
- changes from version 5.9.0 :
* Failing tests which use target() now report the highest score
observed for each target alongside the failing example(s), even
without explicitly showing test statistics.
* This improves the debugging workflow for tests of accuracy, which
assert that the total imprecision is within some error budget -
for example, abs(a - b) < 0.5. Previously, shrinking to a minimal
failing example could often make errors seem smaller or more
subtle than they really are (see the threshold problem, and issue
#2180).
- changes from version 5.8.6 :
* This patch improves the docstring of binary(), the repr() of
sampled_from() on an enum.Enum subclass, and a warning in our
pytest plugin. There is no change in runtime behaviour.
- changes from version 5.8.5 :
* This release (potentially very significantly) improves the
performance of failing tests in some rare cases, mostly only
relevant when using targeted property-based testing, by stopping
further optimisation of unrelated test cases once a failing
example is found.
- changes from version 5.8.4 :
* This release fixes issue #2395, where under some circumstances
targeted property-based testing could cause Hypothesis to get
caught in an infinite loop.
- changes from version 5.8.3 :
* This patch teaches builds() and from_type() to use the
__signature__ attribute of classes where it has been set,
improving our support for Pydantic models (in pydantic >= 1.5).
- changes from version 5.8.2 :
* This release improves the performance of the part of the core
engine that deliberately generates duplicate values.
- changes from version 5.8.1 :
* This patch improves dates() shrinking, to simplify year, month,
and day like datetimes() rather than minimizing the number of days
since 2000-01-01.
OBS-URL: https://build.opensuse.org/request/show/797684
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=125
2020-04-25 19:00:42 +02:00
|
|
|
BuildRequires: %{python_module Django >= 2.2}
|
2019-10-16 17:28:26 +02:00
|
|
|
BuildRequires: %{python_module attrs >= 19.2.0}
|
2018-06-07 20:15:11 +02:00
|
|
|
BuildRequires: %{python_module flaky}
|
2019-04-30 15:27:39 +02:00
|
|
|
BuildRequires: %{python_module hypothesis >= %{version}}
|
|
|
|
BuildRequires: %{python_module lark-parser >= 0.6.5}
|
2018-06-07 20:15:11 +02:00
|
|
|
BuildRequires: %{python_module mock}
|
2019-04-30 15:27:39 +02:00
|
|
|
BuildRequires: %{python_module numpy >= 1.9.0}
|
2019-10-16 17:28:26 +02:00
|
|
|
BuildRequires: %{python_module pexpect >= 4.7.0}
|
|
|
|
BuildRequires: %{python_module pytest >= 4.3.0}
|
2020-04-09 15:45:48 +02:00
|
|
|
BuildRequires: %{python_module python-dateutil >= 1.4}
|
|
|
|
BuildRequires: %{python_module sortedcontainers >= 2.1.0}
|
2019-03-18 09:14:01 +01:00
|
|
|
BuildRequires: python3-dpcontracts
|
2018-09-05 13:17:34 +02:00
|
|
|
%endif
|
2018-06-07 20:15:11 +02:00
|
|
|
# /SECTION
|
2017-02-24 15:34:42 +01:00
|
|
|
%python_subpackages
|
2015-11-11 11:36:03 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Hypothesis is a library for testing your Python code against a much larger range
|
|
|
|
of examples than you would ever want to write by hand. It's based on the Haskell
|
|
|
|
library, Quickcheck, and is designed to integrate seamlessly into your existing
|
|
|
|
Python unit testing work flow.
|
|
|
|
|
|
|
|
Hypothesis works with most widely used versions of Python. It supports implementations
|
|
|
|
compatible with 2.6, 2.7 and 3.3+, and is known to work on CPython and PyPy (but not
|
|
|
|
PyPy3 until they support a 3.3 compatible version of the language). It does *not* currently
|
|
|
|
work on Jython or on Python 3.0 through 3.2.
|
|
|
|
|
|
|
|
%prep
|
2018-06-07 20:15:11 +02:00
|
|
|
%setup -q -n hypothesis-hypothesis-python-%{version}/hypothesis-python
|
2020-05-21 16:56:46 +02:00
|
|
|
%autopatch -p1
|
|
|
|
|
2019-05-06 11:40:58 +02:00
|
|
|
# the django fails to initialize
|
2019-05-07 10:59:27 +02:00
|
|
|
rm -r tests/django
|
|
|
|
# do not pull in pandas as a dep in ring1; it slows down things too much
|
|
|
|
rm -r tests/pandas
|
2015-11-11 11:36:03 +01:00
|
|
|
|
|
|
|
%build
|
2017-02-24 15:34:42 +01:00
|
|
|
%python_build
|
2015-11-11 11:36:03 +01:00
|
|
|
|
|
|
|
%install
|
2018-09-17 15:03:22 +02:00
|
|
|
%if !%{with test}
|
2017-02-24 15:34:42 +01:00
|
|
|
%python_install
|
2018-09-05 13:17:34 +02:00
|
|
|
%{python_expand \
|
|
|
|
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/
|
|
|
|
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/
|
|
|
|
%fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
}
|
2018-09-17 15:03:22 +02:00
|
|
|
%endif
|
2018-09-05 13:17:34 +02:00
|
|
|
|
|
|
|
%check
|
2019-04-30 15:27:39 +02:00
|
|
|
%if %{with test}
|
2019-05-06 12:02:51 +02:00
|
|
|
# test_prints_statistics_given_option_under_xdist - wrong xdist opts
|
2019-10-16 17:28:26 +02:00
|
|
|
%pytest tests -k "not test_prints_statistics_given_option_under_xdist"
|
2018-09-05 13:17:34 +02:00
|
|
|
%endif
|
2015-11-11 11:36:03 +01:00
|
|
|
|
2019-04-30 15:27:39 +02:00
|
|
|
%if !%{with test}
|
2017-02-24 15:34:42 +01:00
|
|
|
%files %{python_files}
|
2018-06-07 20:15:11 +02:00
|
|
|
%license ../LICENSE.txt
|
2019-03-25 09:42:00 +01:00
|
|
|
%doc ../CITATION README.rst docs/changes.rst
|
2018-07-01 23:23:01 +02:00
|
|
|
%{python_sitelib}/hypothesis*
|
2018-09-13 16:27:57 +02:00
|
|
|
%endif
|
2015-11-11 11:36:03 +01:00
|
|
|
|
|
|
|
%changelog
|