From 1f0ffad9dd3497a678513a280f32de2681d67108 Mon Sep 17 00:00:00 2001 From: Joel Capitao Date: Nov 06 2024 14:23:25 +0000 Subject: Import python-flaky-3.8.1-1.el10s in CloudSIG Epoxy --- diff --git a/.python-flaky.metadata b/.python-flaky.metadata new file mode 100644 index 0000000..53515fd --- /dev/null +++ b/.python-flaky.metadata @@ -0,0 +1 @@ +aca1dbac3fdbaf0d4301412ea2c27829b41aefaf SOURCES/flaky-3.8.1.tar.gz diff --git a/SOURCES/.gitkeep b/SOURCES/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/SOURCES/.gitkeep diff --git a/SPECS/python-flaky.spec b/SPECS/python-flaky.spec new file mode 100644 index 0000000..be8783c --- /dev/null +++ b/SPECS/python-flaky.spec @@ -0,0 +1,65 @@ +Name: python-flaky +Version: 3.8.1 +Release: %autorelease +Summary: Plugin for pytest that automatically reruns flaky tests +License: Apache-2.0 +URL: https://github.com/box/flaky +Source: %{pypi_source flaky} +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-pytest + +%description +Flaky is a plugin for pytest that automatically reruns flaky +tests. Ideally, tests reliably pass or fail, but sometimes test fixtures must +rely on components that aren't 100% reliable. With flaky, instead of removing +those tests or marking them to @skip, they can be automatically retried. + + +%package -n python3-flaky +Summary: %{summary} + +%description -n python3-flaky +Flaky is a plugin for pytest that automatically reruns flaky +tests. Ideally, tests reliably pass or fail, but sometimes test fixtures must +rely on components that aren't 100% reliable. With flaky, instead of removing +those tests or marking them to @skip, they can be automatically retried. + + +%prep +%autosetup -p1 -n flaky-%{version} + +# Use mock from standard library: +sed -i -e 's/import mock/from unittest import mock/' \ + -e 's/from mock/from unittest.mock/' \ + test/test_*/test_*.py + + +%generate_buildrequires +%pyproject_buildrequires + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files -l flaky + + +%check +# adapted from upstream's tox.ini +%pytest -v -k 'example and not options' --doctest-modules test/test_pytest/ +%pytest -v -k 'example and not options' test/test_pytest/ +%pytest -v -p no:flaky test/test_pytest/test_flaky_pytest_plugin.py +%pytest -v --force-flaky --max-runs 2 test/test_pytest/test_pytest_options_example.py + + +%files -n python3-flaky -f %{pyproject_files} +%doc README.rst + + +%changelog +%autochangelog