1
0

Accepting request 999928 from devel:languages:python:pytest

OBS-URL: https://build.opensuse.org/request/show/999928
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-timeout?expand=0&rev=12
This commit is contained in:
Dominique Leuenberger 2022-08-30 12:48:28 +00:00 committed by Git OBS Bridge
commit fe6c832acf
4 changed files with 29 additions and 14 deletions

View File

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

BIN
pytest-timeout-2.1.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Fri Aug 19 18:22:49 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to 2.1.0
* Get terminal width from shutil instead of deprecated py, thanks
Andrew Svetlov.
* Add an API for extending ``pytest-timeout`` functionality
with third-party plugins, thanks Andrew Svetlov.
- Don't test with pytest-cov in Staging: Put Ring1 on coverage diet
-------------------------------------------------------------------
Thu Jan 6 01:39:29 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>

View File

@ -16,22 +16,27 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
%bcond_with ringdisabled
Name: python-pytest-timeout
Version: 2.0.2
Version: 2.1.0
Release: 0
Summary: Pytest plugin to abort hanging tests
License: MIT
URL: https://github.com/pytest-dev/pytest-timeout/
Source: https://files.pythonhosted.org/packages/source/p/pytest-timeout/pytest-timeout-%{version}.tar.gz
BuildRequires: %{python_module pexpect}
BuildRequires: %{python_module pytest >= 5.0.0}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-pytest >= 5.0.0
# SECTION test
%if !%{with ringdisabled}
BuildRequires: %{python_module pytest-cov}
%endif
BuildRequires: %{python_module pexpect}
# /SECTION
BuildArch: noarch
%python_subpackages
@ -42,15 +47,13 @@ time. This is useful when running tests under a continuous
integration server or simply if you don't know why the test suite
hangs.
Note that while by default on POSIX systems py.test will continue to
Note that while by default on POSIX systems pytest will continue to
execute the tests after a test has timed, out this is not always
possible. Often the only sure way to interrupt a hanging test is by
terminating the entire process. As this is a hard termination
(``os._exit()``) it will result in no teardown, JUnit XML output etc.
But the plugin will ensure you will have the debugging output on
stderr nevertheless, which is the most important part at this stage.
See below for detailed information on the timeout methods and their
side-effects.
%prep
%setup -q -n pytest-timeout-%{version}
@ -63,14 +66,16 @@ side-effects.
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export PYTHONDONTWRITEBYTECODE=1
%pytest
%if %{with ringdisabled}
donttest="or test_cov"
%endif
%pytest -k "not (donttestprefix $donttest)"
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitelib}/pytest_timeout-%{version}-py*.egg-info
%{python_sitelib}/pytest_timeout-%{version}*-info
%{python_sitelib}/pytest_timeout.py*
%pycache_only %{python_sitelib}/__pycache__/pytest_timeout*.py*
%pycache_only %{python_sitelib}/__pycache__/pytest_timeout*.pyc
%changelog