Accepting request 718853 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/718853
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flaky?expand=0&rev=4
This commit is contained in:
Dominique Leuenberger 2019-07-31 12:15:46 +00:00 committed by Git OBS Bridge
commit d7bef8ffbc
5 changed files with 47 additions and 4 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:12bd5e41f372b2190e8d754b6e5829c2f11dbc764e10b30f57e59f829c9ca1da
size 29320

3
flaky-3.6.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c24e321b3b4b4a2d323b646acff6738e7601849832f4280864d69f00a6a9869d
size 29523

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Fri Jul 26 10:48:12 UTC 2019 - pgajdos@suse.com
- version update to 3.6.0
* Do not print an empty report if no tests marked 'flaky' were run at all (#116). NOTE: This change could be breaking if you relied on the flaky report being printed.
- test via multibuild
- added sources
+ _multibuild
-------------------------------------------------------------------
Tue Mar 12 15:24:55 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@ -17,18 +17,29 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-flaky
Version: 3.5.3
Version: 3.6.0
Release: 0
Summary: Plugin for nose or py.test that automatically reruns flaky tests
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/box/flaky
Source: https://files.pythonhosted.org/packages/source/f/flaky/flaky-%{version}.tar.gz
%if %{with test}
BuildRequires: %{python_module flaky >= %{version}}
BuildRequires: %{python_module genty}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module pytest}
%endif
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@ -47,16 +58,36 @@ For more information about flaky, see `this presentation <http://opensource.box.
%prep
%setup -q -n flaky-%{version}
%if !%{with test}
%build
%python_build
%endif
%if !%{with test}
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
%{python_expand echo
nosetests="nosetests-%{$python_bin_suffix}"
pytest="pytest-%{$python_bin_suffix}"
$nosetests --with-flaky --exclude="test_nose_options_example" test/test_nose/
$pytest -k 'example and not options' --doctest-modules test/test_pytest/
$pytest -k 'example and not options' test/test_pytest/
$pytest -p no:flaky test/test_pytest/test_flaky_pytest_plugin.py
$nosetests --with-flaky --force-flaky --max-runs 2 test/test_nose/test_nose_options_example.py
$pytest --force-flaky --max-runs 2 test/test_pytest/test_pytest_options_example.py
}
%endif
%if !%{with test}
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitelib}/*
%endif
%changelog