Accepting request 867203 from home:mcalabkova:branches:devel:languages:python:pytest

- Update to 2.11.1
  * Fixed the missing coverage context when using subprocesses.
  * Bumped minimum coverage requirement to 5.2.1. This prevents reporting issues.
- Drop merged pytest62.patch

OBS-URL: https://build.opensuse.org/request/show/867203
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-cov?expand=0&rev=24
This commit is contained in:
Markéta Machová 2021-01-27 14:17:33 +00:00 committed by Git OBS Bridge
parent e8988c1b79
commit c549190a54
5 changed files with 15 additions and 41 deletions

View File

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

3
pytest-cov-2.11.1.tar.gz Normal file
View File

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

View File

@ -1,31 +0,0 @@
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',

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Jan 27 13:51:26 UTC 2021 - Markéta Machová <mmachova@suse.com>
- Update to 2.11.1
* Fixed the missing coverage context when using subprocesses.
* Bumped minimum coverage requirement to 5.2.1. This prevents reporting issues.
- Drop merged pytest62.patch
-------------------------------------------------------------------
Fri Jan 15 11:59:34 UTC 2021 - Markéta Machová <mmachova@suse.com>

View File

@ -18,25 +18,23 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-cov
Version: 2.10.1
Version: 2.11.1
Release: 0
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 coverage >= 5.2.1}
BuildRequires: %{python_module fields}
BuildRequires: %{python_module process-tests}
BuildRequires: %{python_module pytest >= 4.6.0}
BuildRequires: %{python_module pytest-xdist >= 1.32.0}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: %{python_module virtualenv}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-coverage >= 4.4
Requires: python-coverage >= 5.2.1
Requires: python-pytest >= 4.6.0
BuildArch: noarch
%python_subpackages
@ -51,7 +49,6 @@ through pytest-cov or through coverage's config file.
%prep
%setup -q -n pytest-cov-%{version}
%patch0 -p1
%build
%python_build