Sync from SUSE:ALP:Source:Standard:1.0 python-pytest-cov revision 99c15f6890f62ff714daace6551275a8

This commit is contained in:
Adrian Schröter 2023-10-19 02:47:35 +02:00
commit 4ee8bfc17f
5 changed files with 409 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

BIN
pytest-cov-4.1.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

284
python-pytest-cov.changes Normal file
View File

@ -0,0 +1,284 @@
-------------------------------------------------------------------
Thu Jun 1 08:51:00 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 4.1.0:
* Updated CI with new Pythons and dependencies.
* Removed rsyncdir support. This makes pytest-cov compatible
with xdist 3.0.
* Added support for JSON reporting.
* Refactored code to use f-strings.
* Fixed a skip in the test suite for some old xdist.
-------------------------------------------------------------------
Fri Apr 21 12:31:31 UTC 2023 - Dirk Müller <dmueller@suse.com>
- add sle15_python_module_pythons (jsc#PED-68)
-------------------------------------------------------------------
Thu Apr 13 22:44:00 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Make calling of %{sle15modernpython} optional.
-------------------------------------------------------------------
Thu Dec 8 10:28:35 UTC 2022 - pgajdos@suse.com
- six is not required for build
-------------------------------------------------------------------
Wed Nov 30 08:16:55 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
- Disable test_dist_boxed, broken with latest version of pytest-xdist,
gh#pytest-dev/pytest-cov#565
-------------------------------------------------------------------
Mon Nov 28 09:31:24 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
- Disable failing tests (test_contexts) that fails because of the new version
of python-coverage, gh#pytest-dev/pytest-cov#570
-------------------------------------------------------------------
Fri Nov 25 11:55:18 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
- Remove support-coverage-62.patch
- Remove support-setuptools60.patch
- Update to 4.0.0:
* --cov-fail-under no longer causes pytest --collect-only to fail Contributed
by Zac Hatfield-Dodds in #511.
* Dropped support for multiprocessing (mostly because issue 82408). This
feature was mostly working but very broken in certain scenarios and made
the test suite very flaky and slow.
* There is builtin multiprocessing support in coverage and you can migrate to
that. All you need is this in your .coveragerc:
[run]
concurrency = multiprocessing
parallel = true
sigterm = true
* Fixed deprecation in setup.py by trying to import setuptools before
distutils. Contributed by Ben Greiner in #545.
* Removed undesirable new lines that were displayed while reporting was
disabled. Contributed by Delgan in #540.
* Documentation fixes. Contributed by Andre Brisco in #543 and Colin O'Dell
in #525.
* Added support for LCOV output format via --cov-report=lcov. Only works with
coverage 6.3+. Contributed by Christian Fetzer in #536.
* Modernized pytest hook implementation. Contributed by Bruno Oliveira in
#549 and Ronny Pfannschmidt in #550.
-------------------------------------------------------------------
Sun Jul 17 20:14:59 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Add support-setuptools60.patch gh#pytest-dev/pytest-cov#545
-------------------------------------------------------------------
Mon Dec 20 01:21:53 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
- Add support-coverage-62.patch:
* Support coverage >= 6.2
-------------------------------------------------------------------
Wed Nov 10 13:05:15 UTC 2021 - Ondřej Súkup <mimi.vx@gmail.com>
- drop pytest-cov-pr453-coverage54.patch
- update to 3.0.0
* drop support for py2 and python-3.5
-------------------------------------------------------------------
Tue Sep 14 08:45:47 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
- Inject multibuild to avoid build cycles.
-------------------------------------------------------------------
Thu Feb 4 09:58:52 UTC 2021 - Ben Greiner <code@bnavigator.de>
- 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á <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>
- Add pytest62.patch to make testsuite compatible with new pytest
-------------------------------------------------------------------
Fri Aug 21 14:16:07 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- Update to 2.10.1
* Support for ``pytest-xdist`` 2.0, which breaks compatibility with ``pytest-xdist`` before 1.22.3 (from 2017).
* Fixed the ``LocalPath has no attribute startswith`` failure that occurred when using the ``pytester`` plugin
in inline mode.
* Dropped support for Python 3 < 3.4, Pytest < 3.5 and Coverage < 4.4.
-------------------------------------------------------------------
Mon Jun 29 09:21:38 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- Update to 2.10.0
* Improved the --no-cov warning. Now it's only shown if --no-cov is present before --cov.
* Removed legacy pytest support. Changed setup.py so that pytest>=4.6 is required.
-------------------------------------------------------------------
Tue Jun 9 08:07:16 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 2.9.0:
* Fixed RemovedInPytest4Warning when using Pytest 3.10. Contributed by Michael Manganiello in #354.
* Made pytest startup faster when plugin not active by lazy-importing. Contributed by Anders Hovmöller in #339.
* Various CI improvements. Contributed by Daniel Hahler in #363 and #364.
* Various Python support updates (drop EOL 3.4, test against 3.8 final). Contributed by Hugo van Kemenade in #336 and #367.
* Changed --cov-append to always enable data_suffix (a coverage setting). Contributed by Harm Geerts in #387.
* Changed --cov-append to handle loading previous data better (fixes various path aliasing issues).
* Various other testing improvements, github issue templates, example updates.
* Fixed internal failures that are caused by tests that change the current working directory by ensuring a consistent working directory when coverage is called. See #306 and coveragepy#881
-------------------------------------------------------------------
Wed Jan 15 12:50:24 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Skip test_cover_looponfail as it fails with new pytest
-------------------------------------------------------------------
Thu Dec 5 04:06:23 UTC 2019 - Steve Kowalik <steven.kowalik@suse.com>
- Skip 6 test cases that are causing problems with Python 3.8
-------------------------------------------------------------------
Wed Nov 6 13:25:11 CET 2019 - Matej Cepl <mcepl@suse.com>
- Switch off another test cases to make test suite pass.
gh#pytest-dev/pytest-cov#358
-------------------------------------------------------------------
Mon Oct 7 08:34:43 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 2.8.1:
* Fixed #348 - regression when only certain reports (html or xml) are used then --cov-fail-under always fails.
* Added compatibility with future xdist release that deprecates some internals (match pytest-xdist master/worker terminology). Contributed by Thomas Grainger in #321
* Added support for Coverage 5.0
-------------------------------------------------------------------
Mon May 6 11:04:02 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 2.7.1:
* Fixed AttributeError: 'NoneType' object has no attribute 'configure_node' error when --no-cov is used. Contributed by Alexander Shadchin in #263.
* Various testing and CI improvements. Contributed by Daniel Hahler in #255, #266, #272, #271 and #269.
* Improved documentation regarding subprocess and multiprocessing. Contributed in #265.
* Improved pytest_cov.embed.cleanup_on_sigterm to be reentrant (signal deliveries while signal handling is running won't break stuff).
* Added pytest_cov.embed.cleanup_on_signal for customized cleanup.
* Improved cleanup code and fixed various issues with leftover data files. All contributed in #265 or #262.
* Improved examples. Now there are two examples for the common project layouts, complete with working coverage configuration. The examples have CI testing. Contributed in #267.
* Improved help text for CLI options.
-------------------------------------------------------------------
Wed Feb 13 09:49:04 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 2.6.1:
* Added support for Pytest 4.1. Contributed by Daniel Hahler and Семён Марьясин in #253 and #230.
* Various test and docs fixes. Contributed by Daniel Hahler in #224 and #223.
* Fixed the "Module already imported" issue (#211). Contributed by Daniel Hahler in #228.
-------------------------------------------------------------------
Fri Oct 26 13:25:08 UTC 2018 - Ondřej Súkup <mimi.vx@gmail.com>
- update to 2.6.0
- cleanup deps
* Dropped support for Python < 3.4, Pytest < 3.5 and Coverage < 4.4
* Fixed some documentation formatting.
* Added an example with addopts in documentation.
* Fixed TypeError: 'NoneType' object is not iterable in certain xdist configurations.
* Added a no_cover marker and fixture.
* Fixed broken no_cover check when running doctests.
* Fixed various issues with path normalization in reports
(when combining coverage data from parallel mode).
* Report generation failures don't raise exceptions anymore.
A warning will be logged instead.
-------------------------------------------------------------------
Sun Sep 24 21:47:40 UTC 2017 - arun@gmx.de
- update to version 2.5.1:
* Fixed xdist breakage (regression in 2.5.0). Fixes #157.
* Allow setting custom data_file name in .coveragerc. Fixes
#145. Contributed by Jannis Leidel & Ionel Cristian Mărieș in
#156.
- changes from version 2.5.0:
* Always show a summary when --cov-fail-under is used. Contributed
by Francis Niu in PR#141.
* Added --cov-branch option. Fixes #85.
* Improve exception handling in subprocess setup. Fixes #144.
* Fixed handling when --cov is used multiple times. Fixes #151.
-------------------------------------------------------------------
Wed Mar 1 16:38:13 UTC 2017 - aloisio@gmx.com
- Update to version 2.4.0:
* Added a "disarm" option: --no-cov. It will disable coverage
measurements. Contributed by Zoltan Kozma in PR#135.
WARNING: Do not put this in your configuration files, it's meant
to be an one-off for situations where you want to disable coverage
from command line.
* Fixed broken exception handling on .pth file. See #136.
- Converted to single-spec
- Switched source URL to pypi.io
-------------------------------------------------------------------
Thu Oct 22 13:53:36 UTC 2015 - toddrme2178@gmail.com
- Update to version 2.2.0
* Added support for changing working directory in tests.
Previously changing working directory would disable coverage
measurements in suprocesses.
* Fixed broken handling for --cov-report=annotate.
- Update to version 2.1.0
* Added support for coverage 4.0b2.
* Added the --cov-append command line options.
Contributed by Christian Ledermann in PR#80.
- Update to version 2.0.0
* Added --cov-fail-under, akin to the new fail_under option in
coverage-4.0 (automatically activated if theres a
[report] fail_under = ... in .coveragerc).
* Changed --cov-report=term to automatically upgrade to
--cov-report=term-missing if theres
[run] show_missing = True in .coveragerc.
* Changed --cov so it can be used with no path argument
(in wich case the source settings from .coveragerc will
be used instead).
* Fixed .pth installation to work in all cases
(install, easy_install, wheels, develop etc).
* Fixed .pth uninstallation to work for wheel installs.
* Support for coverage 4.0.
* Data file suffixing changed to use coverages
data_suffix=True option (instead of the custom suffixing).
* Avoid warning about missing coverage data
(just like coverage.control.process_startup).
* Fixed a race condition when running with xdist
(all the workers tried to combine the files).
Its possible that this issue is not present in
pytest-cov 1.8.X.
-------------------------------------------------------------------
Tue May 12 11:12:31 UTC 2015 - benoit.monin@gmx.fr
- update to version 1.8.1:
* no changelog available
- update project URL
- increase minimum version of python-cov-core and python-pytest
- set a minimum version for python-py
-------------------------------------------------------------------
Wed Jul 30 07:27:46 UTC 2014 - toddrme2178@gmail.com
- Update to 1.7.0
* No upstream changelog
-------------------------------------------------------------------
Mon Aug 12 09:35:04 UTC 2013 - speilicke@suse.com
- Initial version

96
python-pytest-cov.spec Normal file
View File

@ -0,0 +1,96 @@
#
# spec file
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%bcond_without test
%define psuffix -%{flavor}
%else
%bcond_with test
%define psuffix %{nil}
%endif
%define skip_python2 1
%{?sle15_python_module_pythons}
Name: python-pytest-cov%{psuffix}
Version: 4.1.0
Release: 0
Summary: Pytest plugin for coverage reporting
License: MIT
URL: https://github.com/pytest-dev/pytest-cov
Source: https://files.pythonhosted.org/packages/source/p/pytest-cov/pytest-cov-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
%if %{with test}
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}
BuildRequires: %{python_module virtualenv}
%endif
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-coverage >= 5.2.1
Requires: python-pytest >= 4.6.0
BuildArch: noarch
%python_subpackages
%description
This plugin produces coverage reports. It supports centralised testing
and distributed testing in both load and each modes. It also supports
coverage of subprocesses.
All features offered by the coverage package should be available, either
through pytest-cov or through coverage's config file.
%prep
%autosetup -p1 -n pytest-cov-%{version}
%build
%python_build
%install
%if ! %{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}/
%endif
%check
%if %{with test}
export PYTHONDONTWRITEBYTECODE=1
echo "import site;site.addsitedir(\"$(pwd)/src\")" > tests/sitecustomize.py
# test_dist_missing_data - needs internet access
# test_central_subprocess_change_cwd_with_pythonpath - needs pytest cov in venv which is not doable in OBS build
donttest="test_dist_missing_data or test_central_subprocess_change_cwd_with_pythonpath"
# Tests broken with the latest version of python-coverage (6.5.0)
# gh#pytest-dev/pytest-cov#570
donttest+=" or test_contexts"
# gh#pytest-dev/pytest-cov#565
donttest+=" or test_dist_boxed"
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib}:$PWD/tests py.test-%{$python_bin_suffix} -v -k "not (${donttest})"
%endif
%if ! %{with test}
%files %{python_files}
%license LICENSE
%doc AUTHORS.rst CHANGELOG.rst README.rst
%{python_sitelib}/pytest-cov.pth
%{python_sitelib}/pytest_cov
%{python_sitelib}/pytest_cov-%{version}-py%{python_version}.egg-info
%endif
%changelog