diff options
author | CoprDistGit <infra@openeuler.org> | 2023-04-11 10:52:57 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-04-11 10:52:57 +0000 |
commit | e6675434ea1f8996ee2fc90659c1283ed07d0a64 (patch) | |
tree | 28f3cc06629a7103a91fa6600bd693f1b3325ce0 | |
parent | bf61222a16a83e13b977a2144c620b483c8fe1b7 (diff) |
automatic import of python-pytest-timeouts
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-pytest-timeouts.spec | 315 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 317 insertions, 0 deletions
@@ -0,0 +1 @@ +/pytest-timeouts-1.2.1.tar.gz diff --git a/python-pytest-timeouts.spec b/python-pytest-timeouts.spec new file mode 100644 index 0000000..f4d3da3 --- /dev/null +++ b/python-pytest-timeouts.spec @@ -0,0 +1,315 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pytest-timeouts +Version: 1.2.1 +Release: 1 +Summary: Linux-only Pytest plugin to control durations of various test case execution phases +License: MIT license +URL: https://github.com/Scony/pytest-timeouts +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/cf/47/9a8d7fa18736d69d218e303345dfe21755e956fd863b0f043ef854ff84a6/pytest-timeouts-1.2.1.tar.gz +BuildArch: noarch + + +%description +# pytest-timeouts +[](https://travis-ci.org/Scony/pytest-timeouts) +[](https://codecov.io/gh/Scony/pytest-timeouts) +[](https://pytest-timeouts.readthedocs.io/en/latest/?badge=latest) +[](https://pypi.org/project/pytest-timeouts/) + + +[](https://pepy.tech/project/pytest-timeouts) +[](https://github.com/Scony/pytest-timeouts/blob/master/LICENSE) + + +Linux-only Pytest plugin to control durations of various test case execution phases. + +## Documentation + +For documentation visit [pytest-timeouts.readthedocs.io](https://pytest-timeouts.readthedocs.io). + +## About + +This plugin has been designed for specific use cases which are out of the scope of famous `pytest-timeout` plugin. +It uses a `SIGALRM` signal to schedule a timer which breaks the test case. + +## Features + +* `setup`, `execution` and `teardown` phase timeouts controllable by: + * opts: `--setup-timeout`, `--execution-timeout` and `--teardown-timeout` + * ini: `setup_timeout`, `execution_timeout` and `teardown_timeout` + * mark: `setup_timeout`, `execution_timeout` and `teardown_timeout` +* fixed order of timeout settings: **opts** > **markers** > **ini**, controlled by `--timeouts-order` +* `--timeouts-order` allow change order of override timeout settings, and disable some settings, i.e. `--timeout-order i` disable markers and opts, any combination is allow +* timeout disabled when debugging with PDB + +## Installation + +### Stable + +```bash +pip install pytest-timeouts +``` + +### Master + +```bash +pip install git+https://github.com/Scony/pytest-timeouts.git +``` + +## Usage + +### Command line + +```bash +pytest --setup-timeout 2.5 --execution-timeout 2.01 --teardown-timeout 0 +``` + +### `pytest.ini` setting + +```ini +[pytest] +setup_timeout = 2.5 +execution_timeout = 2.01 +teardown_timeout = 0 +``` + +### Mark + +```python +import time + +import pytest + + +@pytest.mark.setup_timeout(0.3) +@pytest.mark.execution_timeout(0.5) +@pytest.mark.teardown_timeout(0.4) +def test_timeout(): + time.sleep(1) +``` + +## Contributors + +* Pawel Lampe +* Kamil Luczak + +%package -n python3-pytest-timeouts +Summary: Linux-only Pytest plugin to control durations of various test case execution phases +Provides: python-pytest-timeouts +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pytest-timeouts +# pytest-timeouts +[](https://travis-ci.org/Scony/pytest-timeouts) +[](https://codecov.io/gh/Scony/pytest-timeouts) +[](https://pytest-timeouts.readthedocs.io/en/latest/?badge=latest) +[](https://pypi.org/project/pytest-timeouts/) + + +[](https://pepy.tech/project/pytest-timeouts) +[](https://github.com/Scony/pytest-timeouts/blob/master/LICENSE) + + +Linux-only Pytest plugin to control durations of various test case execution phases. + +## Documentation + +For documentation visit [pytest-timeouts.readthedocs.io](https://pytest-timeouts.readthedocs.io). + +## About + +This plugin has been designed for specific use cases which are out of the scope of famous `pytest-timeout` plugin. +It uses a `SIGALRM` signal to schedule a timer which breaks the test case. + +## Features + +* `setup`, `execution` and `teardown` phase timeouts controllable by: + * opts: `--setup-timeout`, `--execution-timeout` and `--teardown-timeout` + * ini: `setup_timeout`, `execution_timeout` and `teardown_timeout` + * mark: `setup_timeout`, `execution_timeout` and `teardown_timeout` +* fixed order of timeout settings: **opts** > **markers** > **ini**, controlled by `--timeouts-order` +* `--timeouts-order` allow change order of override timeout settings, and disable some settings, i.e. `--timeout-order i` disable markers and opts, any combination is allow +* timeout disabled when debugging with PDB + +## Installation + +### Stable + +```bash +pip install pytest-timeouts +``` + +### Master + +```bash +pip install git+https://github.com/Scony/pytest-timeouts.git +``` + +## Usage + +### Command line + +```bash +pytest --setup-timeout 2.5 --execution-timeout 2.01 --teardown-timeout 0 +``` + +### `pytest.ini` setting + +```ini +[pytest] +setup_timeout = 2.5 +execution_timeout = 2.01 +teardown_timeout = 0 +``` + +### Mark + +```python +import time + +import pytest + + +@pytest.mark.setup_timeout(0.3) +@pytest.mark.execution_timeout(0.5) +@pytest.mark.teardown_timeout(0.4) +def test_timeout(): + time.sleep(1) +``` + +## Contributors + +* Pawel Lampe +* Kamil Luczak + +%package help +Summary: Development documents and examples for pytest-timeouts +Provides: python3-pytest-timeouts-doc +%description help +# pytest-timeouts +[](https://travis-ci.org/Scony/pytest-timeouts) +[](https://codecov.io/gh/Scony/pytest-timeouts) +[](https://pytest-timeouts.readthedocs.io/en/latest/?badge=latest) +[](https://pypi.org/project/pytest-timeouts/) + + +[](https://pepy.tech/project/pytest-timeouts) +[](https://github.com/Scony/pytest-timeouts/blob/master/LICENSE) + + +Linux-only Pytest plugin to control durations of various test case execution phases. + +## Documentation + +For documentation visit [pytest-timeouts.readthedocs.io](https://pytest-timeouts.readthedocs.io). + +## About + +This plugin has been designed for specific use cases which are out of the scope of famous `pytest-timeout` plugin. +It uses a `SIGALRM` signal to schedule a timer which breaks the test case. + +## Features + +* `setup`, `execution` and `teardown` phase timeouts controllable by: + * opts: `--setup-timeout`, `--execution-timeout` and `--teardown-timeout` + * ini: `setup_timeout`, `execution_timeout` and `teardown_timeout` + * mark: `setup_timeout`, `execution_timeout` and `teardown_timeout` +* fixed order of timeout settings: **opts** > **markers** > **ini**, controlled by `--timeouts-order` +* `--timeouts-order` allow change order of override timeout settings, and disable some settings, i.e. `--timeout-order i` disable markers and opts, any combination is allow +* timeout disabled when debugging with PDB + +## Installation + +### Stable + +```bash +pip install pytest-timeouts +``` + +### Master + +```bash +pip install git+https://github.com/Scony/pytest-timeouts.git +``` + +## Usage + +### Command line + +```bash +pytest --setup-timeout 2.5 --execution-timeout 2.01 --teardown-timeout 0 +``` + +### `pytest.ini` setting + +```ini +[pytest] +setup_timeout = 2.5 +execution_timeout = 2.01 +teardown_timeout = 0 +``` + +### Mark + +```python +import time + +import pytest + + +@pytest.mark.setup_timeout(0.3) +@pytest.mark.execution_timeout(0.5) +@pytest.mark.teardown_timeout(0.4) +def test_timeout(): + time.sleep(1) +``` + +## Contributors + +* Pawel Lampe +* Kamil Luczak + +%prep +%autosetup -n pytest-timeouts-1.2.1 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-pytest-timeouts -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 1.2.1-1 +- Package Spec generated @@ -0,0 +1 @@ +23875173862eee51a0c22c8ae6888fe9 pytest-timeouts-1.2.1.tar.gz |