#1 Add upstream patch for pytest 4 compatibility
Merged 2 years ago by swt2c. Opened 2 years ago by churchyard.
rpms/ churchyard/python-pytest-timeout pytest4  into  master

file added
+28
@@ -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("""

file modified
+9 -2
@@ -6,12 +6,16 @@ 

  

  Name:           python-%{pypi_name}

  Version:        1.3.3

- Release:        2%{?dist}

+ Release:        3%{?dist}

  Summary:        py.test plugin to abort hanging tests

  

  License:        MIT

  URL:            https://bitbucket.org/pytest-dev/pytest-timeout/

  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

  

  BuildRequires:  python2-devel
@@ -41,7 +45,7 @@ 

  %{desc}

  

  %prep

- %autosetup -n %{pypi_name}-%{version}

+ %autosetup -p1 -n %{pypi_name}-%{version}

  

  %build

  %py2_build
@@ -68,6 +72,9 @@ 

  %{python3_sitelib}/__pycache__/pytest_timeout*

  

  %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

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

  

no initial comment

Pull-Request has been merged by swt2c

2 years ago