]>
Commit | Line | Data |
---|---|---|
57f4d70c JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | ||
5 | Summary: pytest plugin to re-run tests to eliminate flaky failures | |
6 | Summary(pl.UTF-8): Wtyczka pytesta do ponownego uruchamiania testów w celu wyeliminowania chwilowych niepowodzeń | |
7 | Name: python3-pytest-rerunfailures | |
8 | Version: 9.1.1 | |
9 | Release: 1 | |
10 | License: MPL v2.0 | |
11 | Group: Libraries/Python | |
12 | #Source0Download: https://pypi.org/simple/pytest-rerunfailures/ | |
13 | Source0: https://files.pythonhosted.org/packages/source/p/pytest-rerunfailures/pytest-rerunfailures-%{version}.tar.gz | |
14 | # Source0-md5: fe21612be35d540dd7ddd4a715f6f7f0 | |
15 | URL: https://pypi.org/project/pytest-rerunfailures/ | |
16 | BuildRequires: python3-modules >= 1:3.5 | |
17 | BuildRequires: python3-setuptools >= 40.0 | |
18 | %if %{with tests} | |
19 | BuildRequires: python3-pytest >= 5.0 | |
20 | BuildRequires: python3-pytest < 6.2 | |
21 | %endif | |
22 | BuildRequires: rpm-pythonprov | |
23 | BuildRequires: rpmbuild(macros) >= 1.714 | |
24 | Requires: python3-modules >= 1:3.5 | |
25 | BuildArch: noarch | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | pytest-rerunfailures is a plugin for py.test that re-runs tests to | |
30 | eliminate intermittent failures. | |
31 | ||
32 | %description -l pl.UTF-8 | |
33 | pytest-rerunfailures to wtyczka modułu py.test uruchamiająca ponownie | |
34 | testy, aby wyeliminować chwilowe niepowodzenia. | |
35 | ||
36 | %prep | |
37 | %setup -q -n pytest-rerunfailures-%{version} | |
38 | ||
39 | %build | |
40 | %py3_build | |
41 | ||
42 | %if %{with tests} | |
43 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
44 | PYTEST_PLUGINS="pytest_rerunfailures" \ | |
45 | %{__python3} -m pytest test_pytest_rerunfailures.py | |
46 | %endif | |
47 | ||
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | ||
51 | %py3_install | |
52 | ||
53 | %clean | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %files | |
57 | %defattr(644,root,root,755) | |
58 | %doc CHANGES.rst LICENSE README.rst | |
59 | %{py3_sitescriptdir}/pytest_rerunfailures.py | |
60 | %{py3_sitescriptdir}/__pycache__/pytest_rerunfailures.cpython-*.py[co] | |
61 | %{py3_sitescriptdir}/pytest_rerunfailures-%{version}-py*.egg-info |