From 3573179fe9047fe387ab64dc751973d8570125281f161f50c4467ac12b2ed9ee Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 4 Feb 2021 16:15:01 +0000 Subject: [PATCH] Accepting request 869186 from home:bnavigator:branches:devel:languages:python:pytest - Add pytest-cov-pr453-coverage54.patch to work with coverage 5.4 gh#pytest-dev/pytest-cov#453 OBS-URL: https://build.opensuse.org/request/show/869186 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-cov?expand=0&rev=26 --- pytest-cov-pr453-coverage54.patch | 40 +++++++++++++++++++++++++++++++ python-pytest-cov.changes | 6 +++++ python-pytest-cov.spec | 4 +++- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 pytest-cov-pr453-coverage54.patch diff --git a/pytest-cov-pr453-coverage54.patch b/pytest-cov-pr453-coverage54.patch new file mode 100644 index 0000000..b874290 --- /dev/null +++ b/pytest-cov-pr453-coverage54.patch @@ -0,0 +1,40 @@ +From 92ad6f411167dc05bf54beeb5d9ebc916cc0f6f3 Mon Sep 17 00:00:00 2001 +From: chedi +Date: Fri, 29 Jan 2021 18:48:58 +0100 +Subject: [PATCH] fix for failing tests with coverage 5.4 + +--- + tests/test_pytest_cov.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/test_pytest_cov.py b/tests/test_pytest_cov.py +index 3c73050..ff22fef 100644 +--- a/tests/test_pytest_cov.py ++++ b/tests/test_pytest_cov.py +@@ -500,7 +500,7 @@ def test_central_coveragerc(testdir, prop): + ]) + + # single-module coverage report +- assert all(not line.startswith('TOTAL ') for line in result.stdout.lines[-4:]) ++ assert all(not line.startswith('TOTAL ') for line in result.stdout.lines[-3:]) + + assert result.ret == 0 + +@@ -538,7 +538,7 @@ def test_central_with_path_aliasing(testdir, monkeypatch, opts, prop): + ]) + + # single-module coverage report +- assert all(not line.startswith('TOTAL ') for line in result.stdout.lines[-4:]) ++ assert all(not line.startswith('TOTAL ') for line in result.stdout.lines[-3:]) + + assert result.ret == 0 + +@@ -643,7 +643,7 @@ def test_show_missing_coveragerc(testdir, prop): + ]) + + # single-module coverage report +- assert all(not line.startswith('TOTAL ') for line in result.stdout.lines[-4:]) ++ assert all(not line.startswith('TOTAL ') for line in result.stdout.lines[-3:]) + + assert result.ret == 0 + diff --git a/python-pytest-cov.changes b/python-pytest-cov.changes index f0a736e..35febc7 100644 --- a/python-pytest-cov.changes +++ b/python-pytest-cov.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 4 09:58:52 UTC 2021 - Ben Greiner + +- Add pytest-cov-pr453-coverage54.patch to work with coverage 5.4 + gh#pytest-dev/pytest-cov#453 + ------------------------------------------------------------------- Wed Jan 27 13:51:26 UTC 2021 - Markéta Machová diff --git a/python-pytest-cov.spec b/python-pytest-cov.spec index 1f8cbfa..8e33930 100644 --- a/python-pytest-cov.spec +++ b/python-pytest-cov.spec @@ -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 gh#pytest-dev/pytest-cov#453 work with coverage 5.4 +Patch0: https://github.com/pytest-dev/pytest-cov/pull/453.patch#/pytest-cov-pr453-coverage54.patch BuildRequires: %{python_module coverage >= 5.2.1} BuildRequires: %{python_module fields} BuildRequires: %{python_module process-tests} @@ -48,7 +50,7 @@ All features offered by the coverage package should be available, either through pytest-cov or through coverage's config file. %prep -%setup -q -n pytest-cov-%{version} +%autosetup -p1 -n pytest-cov-%{version} %build %python_build