Add upstream patch for pytest 4 compatibility
This commit is contained in:
parent
5870eadb19
commit
9b9daefb28
28
pytest4.patch
Normal file
28
pytest4.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User Bruno Oliveira <nicoddemus@gmail.com>
|
||||||
|
# Date 1542370558 7200
|
||||||
|
# Node ID 36998c891573d8ec1db1acd4f9438cb3cf2aee2e
|
||||||
|
# Parent 753c5f39d2a8d1477ea8653ca7c7bdbdca1efafc
|
||||||
|
Change tests to use pytest.param
|
||||||
|
|
||||||
|
diff --git a/test_pytest_timeout.py b/test_pytest_timeout.py
|
||||||
|
--- a/test_pytest_timeout.py
|
||||||
|
+++ b/test_pytest_timeout.py
|
||||||
|
@@ -93,7 +93,7 @@
|
||||||
|
# assert 'Timeout' in result.stdout.str() + result.stderr.str()
|
||||||
|
|
||||||
|
|
||||||
|
-@pytest.mark.parametrize('meth', [have_sigalrm('signal'), 'thread'])
|
||||||
|
+@pytest.mark.parametrize('meth', [pytest.param('signal', marks=have_sigalrm), 'thread'])
|
||||||
|
@pytest.mark.parametrize('scope', ['function', 'class', 'module', 'session'])
|
||||||
|
def test_fix_setup(meth, scope, testdir):
|
||||||
|
testdir.makepyfile("""
|
||||||
|
@@ -133,7 +133,7 @@
|
||||||
|
assert 'Timeout' not in result.stdout.str() + result.stderr.str()
|
||||||
|
|
||||||
|
|
||||||
|
-@pytest.mark.parametrize('meth', [have_sigalrm('signal'), 'thread'])
|
||||||
|
+@pytest.mark.parametrize('meth', [pytest.param('signal', marks=have_sigalrm), 'thread'])
|
||||||
|
@pytest.mark.parametrize('scope', ['function', 'class', 'module', 'session'])
|
||||||
|
def test_fix_finalizer(meth, scope, testdir):
|
||||||
|
testdir.makepyfile("""
|
@ -6,12 +6,16 @@ know why the test suite hangs.
|
|||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Version: 1.3.3
|
Version: 1.3.3
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: py.test plugin to abort hanging tests
|
Summary: py.test plugin to abort hanging tests
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://bitbucket.org/pytest-dev/pytest-timeout/
|
URL: https://bitbucket.org/pytest-dev/pytest-timeout/
|
||||||
Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
# Support Pytest 4
|
||||||
|
Patch1: %{url}commits/36998c891573d8ec1db1acd4f9438cb3cf2aee2e/raw#/pytest4.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
@ -41,7 +45,7 @@ Requires: python3-pytest
|
|||||||
%{desc}
|
%{desc}
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{pypi_name}-%{version}
|
%autosetup -p1 -n %{pypi_name}-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
%py2_build
|
||||||
@ -68,6 +72,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} PYTHONDONTWRITEBYTECODE=1 py.test-%{py
|
|||||||
%{python3_sitelib}/__pycache__/pytest_timeout*
|
%{python3_sitelib}/__pycache__/pytest_timeout*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 04 2019 Miro Hrončok <mhroncok@redhat.com> - 1.3.3-3
|
||||||
|
- Add upstream patch for pytest 4 compatibility
|
||||||
|
|
||||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.3-2
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.3-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user