|
|
1f0ffa |
Name: python-flaky
|
|
|
1f0ffa |
Version: 3.8.1
|
|
|
1f0ffa |
Release: %autorelease
|
|
|
1f0ffa |
Summary: Plugin for pytest that automatically reruns flaky tests
|
|
|
1f0ffa |
License: Apache-2.0
|
|
|
1f0ffa |
URL: https://github.com/box/flaky
|
|
|
1f0ffa |
Source: %{pypi_source flaky}
|
|
|
1f0ffa |
BuildArch: noarch
|
|
|
1f0ffa |
|
|
|
1f0ffa |
BuildRequires: python3-devel
|
|
|
1f0ffa |
BuildRequires: python3-pytest
|
|
|
1f0ffa |
|
|
|
1f0ffa |
%description
|
|
|
1f0ffa |
Flaky is a plugin for pytest that automatically reruns flaky
|
|
|
1f0ffa |
tests. Ideally, tests reliably pass or fail, but sometimes test fixtures must
|
|
|
1f0ffa |
rely on components that aren't 100% reliable. With flaky, instead of removing
|
|
|
1f0ffa |
those tests or marking them to @skip, they can be automatically retried.
|
|
|
1f0ffa |
|
|
|
1f0ffa |
|
|
|
1f0ffa |
%package -n python3-flaky
|
|
|
1f0ffa |
Summary: %{summary}
|
|
|
1f0ffa |
|
|
|
1f0ffa |
%description -n python3-flaky
|
|
|
1f0ffa |
Flaky is a plugin for pytest that automatically reruns flaky
|
|
|
1f0ffa |
tests. Ideally, tests reliably pass or fail, but sometimes test fixtures must
|
|
|
1f0ffa |
rely on components that aren't 100% reliable. With flaky, instead of removing
|
|
|
1f0ffa |
those tests or marking them to @skip, they can be automatically retried.
|
|
|
1f0ffa |
|
|
|
1f0ffa |
|
|
|
1f0ffa |
%prep
|
|
|
1f0ffa |
%autosetup -p1 -n flaky-%{version}
|
|
|
1f0ffa |
|
|
|
1f0ffa |
# Use mock from standard library:
|
|
|
1f0ffa |
sed -i -e 's/import mock/from unittest import mock/' \
|
|
|
1f0ffa |
-e 's/from mock/from unittest.mock/' \
|
|
|
1f0ffa |
test/test_*/test_*.py
|
|
|
1f0ffa |
|
|
|
1f0ffa |
|
|
|
1f0ffa |
%generate_buildrequires
|
|
|
1f0ffa |
%pyproject_buildrequires
|
|
|
1f0ffa |
|
|
|
1f0ffa |
|
|
|
1f0ffa |
%build
|
|
|
1f0ffa |
%pyproject_wheel
|
|
|
1f0ffa |
|
|
|
1f0ffa |
|
|
|
1f0ffa |
%install
|
|
|
1f0ffa |
%pyproject_install
|
|
|
1f0ffa |
%pyproject_save_files -l flaky
|
|
|
1f0ffa |
|
|
|
1f0ffa |
|
|
|
1f0ffa |
%check
|
|
|
1f0ffa |
# adapted from upstream's tox.ini
|
|
|
1f0ffa |
%pytest -v -k 'example and not options' --doctest-modules test/test_pytest/
|
|
|
1f0ffa |
%pytest -v -k 'example and not options' test/test_pytest/
|
|
|
1f0ffa |
%pytest -v -p no:flaky test/test_pytest/test_flaky_pytest_plugin.py
|
|
|
1f0ffa |
%pytest -v --force-flaky --max-runs 2 test/test_pytest/test_pytest_options_example.py
|
|
|
1f0ffa |
|
|
|
1f0ffa |
|
|
|
1f0ffa |
%files -n python3-flaky -f %{pyproject_files}
|
|
|
1f0ffa |
%doc README.rst
|
|
|
1f0ffa |
|
|
|
1f0ffa |
|
|
|
1f0ffa |
%changelog
|
|
|
1f0ffa |
%autochangelog
|