Accepting request 519238 from devel:languages:python

Needed by the latest version of spyder and spyder3

OBS-URL: https://build.opensuse.org/request/show/519238
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-timeout?expand=0&rev=1
This commit is contained in:
Dominique Leuenberger 2017-08-29 09:46:53 +00:00 committed by Git OBS Bridge
commit 2365f88f2d
5 changed files with 121 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

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

View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Mon Aug 28 21:52:12 UTC 2017 - toddrme2178@gmail.com
- Initial version

View File

@ -0,0 +1,90 @@
#
# spec file for package python-pytest-timeout
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name: python-pytest-timeout
Version: 1.2.0
Release: 0
Summary: Pytest plugin to abort hanging tests
License: MIT
Group: Development/Languages/Python
Url: http://bitbucket.org/pytest-dev/pytest-timeout/
Source: https://files.pythonhosted.org/packages/source/p/pytest-timeout/pytest-timeout-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: %{python_module pexpect}
BuildRequires: %{python_module pytest >= 2.8.0}
BuildRequires: python3-tox
%endif
BuildRequires: fdupes
Requires: python-pexpect
Requires: python-pytest >= 2.8.0
BuildArch: noarch
%python_subpackages
%description
This is a plugin which will terminate tests after a certain timeout.
When doing so it will show a stack dump of all threads running at the
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
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}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
mkdir tester
pushd tester
ln -s ../test_pytest_timeout.py .
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
$python -B -m pytest test_pytest_timeout.py
rm -r %{buildroot}%{$python_sitelib}/__pycache__/pytest_timeout.*-PYTEST.pyc
}
popd
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE README
%{python_sitelib}/pytest_timeout-%{version}-py*.egg-info
%{python_sitelib}/pytest_timeout.py*
%pycache_only %{python_sitelib}/__pycache__/pytest_timeout.*.pyc
%changelog