Fix issue with test code where it expected too specific of a string, that string changed slightly with coverage 6.2, fix adjusts string check to be more permissive and work with both old and new coverage

epel9
Tom spot Callaway 3 years ago
parent 652ed8d470
commit 103718b41f

@ -0,0 +1,12 @@
diff -up pytest-cov-3.0.0/tests/test_pytest_cov.py.cov62 pytest-cov-3.0.0/tests/test_pytest_cov.py
--- pytest-cov-3.0.0/tests/test_pytest_cov.py.cov62 2021-12-09 13:54:38.736407865 -0500
+++ pytest-cov-3.0.0/tests/test_pytest_cov.py 2021-12-09 13:54:41.432423997 -0500
@@ -968,7 +968,7 @@ def test_invalid_coverage_source(testdir
'*10 passed*'
])
result.stderr.fnmatch_lines([
- 'Coverage.py warning: No data was collected.*'
+ '*No data was collected.*'
])
result.stdout.fnmatch_lines([
'*Failed to generate report: No data to report.',

@ -10,6 +10,8 @@ Summary: Coverage plugin for pytest
License: MIT
URL: %{forgeurl}
Source0: %{forgesource}
# This fix adjusts the coverage test strings to work with 6.2, but they also work with older coverage versions as well.
Patch0: pytest-cov-3.0.0-coverage-6.2.patch
BuildArch: noarch
@ -41,7 +43,7 @@ Summary: %{summary}
%prep
%forgeautosetup
%forgeautosetup -p1
# The “hunter” testing dependency (https://github.com/ionelmc/python-hunter) is
# not packaged, but it also does not seem to be used.
sed -r -i '/^[[:blank:]]*.hunter.,[[:blank:]]*$/d' setup.py

Loading…
Cancel
Save