diff --git a/pytest-cov-4.1.0.tar.gz b/pytest-cov-4.1.0.tar.gz deleted file mode 100644 index 2243ece5b3cf6fa93e4a33986ba8d7bb816b7be5..0000000000000000000000000000000000000000 Binary files a/pytest-cov-4.1.0.tar.gz and /dev/null differ diff --git a/pytest-cov-5.0.0.tar.gz b/pytest-cov-5.0.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..45b10aad592d6b6fd4e82bee77fa68c8005715c3 Binary files /dev/null and b/pytest-cov-5.0.0.tar.gz differ diff --git a/python-pytest-cov.spec b/python-pytest-cov.spec index cd29fa09eb914174e8bb5b7aefeed63be3c1a899..9d71f6955fce72692feb4e9c315d13b889390aa2 100644 --- a/python-pytest-cov.spec +++ b/python-pytest-cov.spec @@ -1,12 +1,15 @@ %bcond_with test Name: python-pytest-cov -Version: 4.1.0 -Release: 2 +Version: 5.0.0 +Release: 1 Summary: Pytest plugin for measuring coverage License: MIT -URL: https://pypi.org/project/pytest-cov/ -Source0: https://files.pythonhosted.org/packages/61/41/e046526849972555928a6d31c2068410e47a31fb5ab0a77f868596811329/pytest-cov-4.1.0.tar.gz +URL: https://github.com/pytest-dev/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#643 +Patch0: support-coverage-75.patch BuildArch: noarch @@ -46,7 +49,7 @@ All features offered by the coverage package should work, either through pytest- or through coverage’s config file. %prep -%autosetup -n pytest-cov-4.1.0 -p1 +%autosetup -p1 -n pytest-cov-%{version} %build %pyproject_build @@ -64,6 +67,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib}:$PWD/tests py.test-%{python3_version} %{python3_sitelib}/* %changelog +* Mon Aug 26 2024 dillon chen - 5.0.0-1 +- update to 5.0.0 + * Wed Jul 12 2023 luluoc - 4.1.0-2 - change py3 to pyproject diff --git a/support-coverage-75.patch b/support-coverage-75.patch new file mode 100644 index 0000000000000000000000000000000000000000..1a11b3e010f90075c2eafb4fd06832f11ae2db9d --- /dev/null +++ b/support-coverage-75.patch @@ -0,0 +1,29 @@ +From 89bd477d5d176666e2d4f3e38983bb69a055a457 Mon Sep 17 00:00:00 2001 +From: Steve Kowalik +Date: Wed, 15 May 2024 14:08:51 +1000 +Subject: [PATCH] Support Coverage 7.5's HTML report changes + +Coverage 7.5 now writes out two other files when generating a HTML +report -- class_index and function_index. We check explicitly for which +files have been written, so add those two in if coverage is >= 7.5. +--- + tests/test_pytest_cov.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/tests/test_pytest_cov.py b/tests/test_pytest_cov.py +index bd9df38..114d34b 100644 +--- a/tests/test_pytest_cov.py ++++ b/tests/test_pytest_cov.py +@@ -292,7 +292,11 @@ def test_term_report_does_not_interact_with_html_output(testdir): + ) + dest_dir = testdir.tmpdir.join(DEST_DIR) + assert dest_dir.check(dir=True) +- assert sorted(dest_dir.visit('**/*.html')) == [dest_dir.join('index.html'), dest_dir.join('test_funcarg_py.html')] ++ expected = [dest_dir.join('index.html'), dest_dir.join('test_funcarg_py.html')] ++ if coverage.version_info >= (7, 5): ++ expected.insert(0, dest_dir.join('function_index.html')) ++ expected.insert(0, dest_dir.join('class_index.html')) ++ assert sorted(dest_dir.visit('**/*.html')) == expected + assert dest_dir.join('index.html').check() + assert result.ret == 0 +