diff --git a/.python-pytest-cov.metadata b/.python-pytest-cov.metadata new file mode 100644 index 0000000..50686be --- /dev/null +++ b/.python-pytest-cov.metadata @@ -0,0 +1 @@ +184f023f95f8a4861b28ca57c9c9be74786ee2d6 SOURCES/pytest-cov-2.11.1.tar.gz diff --git a/SOURCES/0001-fix-for-failing-tests-with-coverage-5.4.patch b/SOURCES/0001-fix-for-failing-tests-with-coverage-5.4.patch new file mode 100644 index 0000000..239ba15 --- /dev/null +++ b/SOURCES/0001-fix-for-failing-tests-with-coverage-5.4.patch @@ -0,0 +1,43 @@ +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 @@ parallel = true + ]) + + # 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 @@ show_missing = true + ]) + + # 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 + +-- +2.29.2 + diff --git a/SOURCES/32d8c0665ea044f9682a89633d75442d1a4d2dc4.patch b/SOURCES/32d8c0665ea044f9682a89633d75442d1a4d2dc4.patch new file mode 100644 index 0000000..b9c9647 --- /dev/null +++ b/SOURCES/32d8c0665ea044f9682a89633d75442d1a4d2dc4.patch @@ -0,0 +1,39 @@ +From 32d8c0665ea044f9682a89633d75442d1a4d2dc4 Mon Sep 17 00:00:00 2001 +From: Ned Batchelder +Date: Thu, 5 Dec 2019 16:37:48 -0500 +Subject: [PATCH] Fix the context tests + +CoverageData.lines() returns a list, but in no guaranteed order. +Set-ify everything to get the correct comparison. +--- + 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 e79e9aa..3be8278 100644 +--- a/tests/test_pytest_cov.py ++++ b/tests/test_pytest_cov.py +@@ -1934,12 +1934,12 @@ def test_cov_and_no_cov(testdir): + + + def find_labels(text, pattern): +- all_labels = collections.defaultdict(list) ++ all_labels = collections.defaultdict(set) + lines = text.splitlines() + for lineno, line in enumerate(lines, start=1): + labels = re.findall(pattern, line) + for label in labels: +- all_labels[label].append(lineno) ++ all_labels[label].add(lineno) + return all_labels + + +@@ -2007,7 +2007,7 @@ def test_contexts(testdir, opts): + if context == '': + continue + data.set_query_context(context) +- actual = data.lines(test_context_path) ++ actual = set(data.lines(test_context_path)) + assert line_data[label] == actual, "Wrong lines for context {!r}".format(context) + + diff --git a/SPECS/python-pytest-cov.spec b/SPECS/python-pytest-cov.spec new file mode 100644 index 0000000..4d2c9d8 --- /dev/null +++ b/SPECS/python-pytest-cov.spec @@ -0,0 +1,208 @@ +%?python_enable_dependency_generator +%global srcname pytest-cov + +%if 0%{?fedora} >= 32 +%bcond_with python2 +%else +%bcond_without python2 +%endif + +Name: python-%{srcname} +Version: 2.11.1 +Release: 3%{?dist} +URL: https://pypi.python.org/pypi/%{srcname} +License: MIT +Summary: Pytest plugin for coverage reporting + +Source0: https://github.com/pytest-dev/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz +Patch0: 0001-fix-for-failing-tests-with-coverage-5.4.patch + +BuildArch: noarch + +%description +Py.test plugin for coverage reporting with support for both centralised and +distributed testing, including subprocesses and multiprocessing for Python. + +%package -n python%{python3_pkgversion}-%{srcname} +Summary: Pytest plugin for coverage reporting +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-pytest >= 3.6 +BuildRequires: python%{python3_pkgversion}-coverage >= 4.4 +# For tests +BuildRequires: python%{python3_pkgversion}-fields +BuildRequires: python%{python3_pkgversion}-process-tests +BuildRequires: python%{python3_pkgversion}-six +#BuildRequires: python%{python3_pkgversion}-virtualenv +BuildRequires: python%{python3_pkgversion}-pytest-xdist +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} + +%description -n python%{python3_pkgversion}-%{srcname} +Py.test plugin for coverage reporting with support for both centralised and +distributed testing, including subprocesses and multiprocessing for Python 3. + +%prep +%autosetup -p1 -n %{srcname}-%{version} +rm -rf *.egg-info + +%build +%py3_build + +%install +%py3_install + +%check +# Disable tests as python-virtualenv does not exist in centos9 and it's pulling +# a bunch of deps +#echo "import site;site.addsitedir(\"$(pwd)/src\")" > tests/sitecustomize.py +#export PYTHONPATH="$(pwd)"/build/lib +#py.test-%{python3_version} -vv \ +# -k "not test_dist_missing_data and not test_subprocess_with_path_aliasing and not test_dist_combine_racecondition and not central_subprocess and not dist_subprocess" + +%files -n python%{python3_pkgversion}-%{srcname} +%license LICENSE +%doc AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst +%{python3_sitelib}/* + + +%changelog +* Fri Jan 29 2021 Chedi Toueiti - 2.11.1-3 +- Fix for failing tests with coverage 5.4 (#1922301) + +* Wed Jan 27 2021 Fedora Release Engineering - 2.11.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jan 20 2021 Chedi Toueiti - 2.11.1-1 +- Update to 2.11.1 (#1917248) + +* Fri Aug 14 2020 Chedi Toueiti - 2.10.1-1 +- Update to 2.10.1 (#1868968) + +* Wed Jul 29 2020 Fedora Release Engineering - 2.10.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jul 9 2020 Chedi Toueiti - 2.10.0 +- Update to 2.10.0 + +* Sun May 24 2020 Miro Hrončok - 2.8.1-6 +- Rebuilt for Python 3.9 + +* Mon Mar 2 2020 Chedi Toueiti - 2.8.1-5 +- Forcing current pytest-cov version usage during checks + +* Thu Jan 30 2020 Fedora Release Engineering - 2.8.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sun Jan 19 2020 Lumír Balhar - 2.8.1-3 +- Unskip tests which are working with the newest coverage + +* Sun Nov 3 2019 Orion Poplawski - 2.8.1-2 +- Drop python 2 for F32+ (bz#1767517) + +* Sat Oct 5 2019 Orion Poplawski - 2.8.1-1 +- Update to 2.8.1 + +* Fri Oct 4 2019 Orion Poplawski - 2.8.0-1 +- Update to 2.8.0 + +* Thu Oct 03 2019 Miro Hrončok - 2.7.1-6 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Sat Aug 17 2019 Miro Hrončok - 2.7.1-5 +- Rebuilt for Python 3.8 + +* Fri Aug 16 2019 Orion Poplawski - 2.7.1-4 +- Enable python dependency generator +- Specify minimum pytest requirement in BR + +* Fri Jul 26 2019 Fedora Release Engineering - 2.7.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu May 16 2019 Lumír Balhar - 2.7.1-2 +- Skip three tests (multiprocessing_pool) to fix FTBFS with Python 3.8 + +* Sun May 5 2019 Orion Poplawski - 2.7.1-1 +- Update to 2.7.1 + +* Thu Apr 04 2019 Miro Hrončok - 2.6.1-1 +- Update to 2.6.1 for pytest 4 compatibility + +* Tue Feb 12 2019 Orion Poplawski - 2.6.0-3 +- Build with pytest-xdist + +* Sat Feb 02 2019 Fedora Release Engineering - 2.6.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Dec 05 2018 Randy Barlow - 2.6.0-1 +- Update to 2.6.0. + +* Sat Jul 14 2018 Fedora Release Engineering - 2.5.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Sat Jun 16 2018 Miro Hrončok - 2.5.1-5 +- Rebuilt for Python 3.7 + +* Fri Feb 09 2018 Fedora Release Engineering - 2.5.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 9 2017 Orion Poplawski - 2.5.1-3 +- Ship python2-pytest-cov + +* Thu Jul 27 2017 Fedora Release Engineering - 2.5.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri May 12 2017 Orion Poplawski - 2.5.1-1 +- Update to 2.5.1 + +* Wed May 10 2017 Orion Poplawski - 2.5.0-1 +- Update to 2.5.0 + +* Sat Feb 11 2017 Fedora Release Engineering - 2.4.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Dec 13 2016 Stratakis Charalampos - 2.4.0-2 +- Rebuild for Python 3.6 + +* Mon Oct 10 2016 Orion Poplawski - 2.4.0-1 +- Update to 2.4.0 + +* Tue Jul 19 2016 Fedora Release Engineering - 2.3.0-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Jul 7 2016 Orion Poplawski - 2.3.0-1 +- Update to 2.3.0 + +* Mon May 23 2016 Orion Poplawski - 2.2.1-1 +- Ignore failing tests + +* Sat Feb 13 2016 Orion Poplawski - 2.2.1-1 +- Update to 2.2.1 + +* Thu Feb 04 2016 Fedora Release Engineering - 2.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Nov 06 2015 Robert Kuska - 2.2.0-2 +- Rebuilt for Python3.5 rebuild +- Skip tests for a python3 rebuild as it seems to be env failure + +* Mon Oct 5 2015 Orion Poplawski - 2.2.0-1 +- Update to 2.2.0 + +* Mon Sep 14 2015 Orion Poplawski - 2.1.0-2 +- Modernize spec +- Run tests properly, skipping xdist tests for now + +* Mon Sep 14 2015 Tomas Tomecek - 2.1.0-1 +- upstream release 2.1.0 + +* Thu Jun 18 2015 Fedora Release Engineering - 1.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue May 27 2014 Orion Poplawski - 1.6-2 +- Rebuild for Python 3.4 + +* Tue Feb 25 2014 Orion Poplawski - 1.6-1 +- Initial package