Accepting request 863329 from home:mcalabkova:branches:devel:languages:python:pytest
- Add pytest62.patch to make testsuite compatible with new pytest OBS-URL: https://build.opensuse.org/request/show/863329 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-cov?expand=0&rev=22
This commit is contained in:
parent
4f77fecc65
commit
e8988c1b79
31
pytest62.patch
Normal file
31
pytest62.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 25eed212085ce9a2d5383a6a4a2b360d0d514f89 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= <contact@ionelmc.ro>
|
||||
Date: Mon, 11 Jan 2021 15:49:18 +0200
|
||||
Subject: [PATCH] Turns out there were some internal changes in the pytester
|
||||
plugin.
|
||||
|
||||
---
|
||||
tests/test_pytest_cov.py | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/test_pytest_cov.py b/tests/test_pytest_cov.py
|
||||
index f0fd6ca..c6511aa 100644
|
||||
--- a/tests/test_pytest_cov.py
|
||||
+++ b/tests/test_pytest_cov.py
|
||||
@@ -1538,8 +1538,14 @@ def test_cover_looponfail(testdir, monkeypatch):
|
||||
testdir.makeconftest(CONFTEST)
|
||||
script = testdir.makepyfile(BASIC_TEST)
|
||||
|
||||
- monkeypatch.setattr(testdir, 'run',
|
||||
- lambda *args, **kwargs: _TestProcess(*map(str, args)))
|
||||
+ def mock_run(*args, **kwargs):
|
||||
+ return _TestProcess(*map(str, args))
|
||||
+
|
||||
+ monkeypatch.setattr(testdir, 'run', mock_run)
|
||||
+ assert testdir.run is mock_run
|
||||
+ if hasattr(testdir, '_pytester'):
|
||||
+ monkeypatch.setattr(testdir._pytester, 'run', mock_run)
|
||||
+ assert testdir._pytester.run is mock_run
|
||||
with testdir.runpytest('-v',
|
||||
'--cov=%s' % script.dirpath(),
|
||||
'--looponfail',
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 15 11:59:34 UTC 2021 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add pytest62.patch to make testsuite compatible with new pytest
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 21 14:16:07 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pytest-cov
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -24,6 +24,8 @@ Summary: Pytest plugin for coverage reporting
|
||||
License: MIT
|
||||
URL: https://github.com/schlamar/pytest-cov
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-cov/pytest-cov-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM https://github.com/pytest-dev/pytest-cov/commit/25eed212085ce9a2d5383a6a4a2b360d0d514f89 Turns out there were some internal changes in the pytester plugin.
|
||||
Patch0: pytest62.patch
|
||||
BuildRequires: %{python_module coverage >= 4.4}
|
||||
BuildRequires: %{python_module fields}
|
||||
BuildRequires: %{python_module process-tests}
|
||||
@ -49,6 +51,7 @@ through pytest-cov or through coverage's config file.
|
||||
|
||||
%prep
|
||||
%setup -q -n pytest-cov-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
Loading…
Reference in New Issue
Block a user