# # spec file for package python-pytest-cov # # Copyright (c) 2020 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/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-pytest-cov Version: 2.8.1 Release: 4.2 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 BuildRequires: %{python_module coverage >= 4.4} BuildRequires: %{python_module fields} BuildRequires: %{python_module process-tests} BuildRequires: %{python_module pytest-xdist} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: %{python_module virtualenv} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-coverage >= 4.4 Requires: python-pytest 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 %setup -q -n pytest-cov-%{version} %build %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib}/ %check # test_dist_missing_data - needs internet access # test_*_collocated gh#pytest-dev/pytest-cov#358 # test_central_subprocess_change_cwd_with_pythonpath - needs pytest cov in venv which is not doable in OBS build # test_multiprocessing* - deadlocks under Python 3.8 # test_dist_combine_racecondition - text ordering under Python 3.8 # test_cover_looponfail - breaks with new pytest echo "import site;site.addsitedir(\"$(pwd)/src\")" > tests/sitecustomize.py %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib}:$PWD/tests py.test-%{$python_bin_suffix} -v -k 'not (test_dist_missing_data or test_central_subprocess_change_cwd_with_pythonpath or test_dist_not_collocated or test_dist_subprocess_not_collocated or test_multiprocessing or test_dist_combine_racecondition or test_cover_looponfail)' %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 %changelog * Wed Jan 15 2020 Tomáš Chvátal - Skip test_cover_looponfail as it fails with new pytest * Thu Dec 5 2019 Steve Kowalik - Skip 6 test cases that are causing problems with Python 3.8 * Wed Nov 6 2019 Matej Cepl - Switch off another test cases to make test suite pass. gh#pytest-dev/pytest-cov#358 * Mon Oct 7 2019 Tomáš Chvátal - 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 2019 Tomáš Chvátal - 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 2019 Tomáš Chvátal - 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 2018 Ondřej Súkup - 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 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 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 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 there’s a [report] fail_under = ... in .coveragerc). * Changed --cov-report=term to automatically upgrade to - -cov-report=term-missing if there’s [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 coverage’s 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). It’s possible that this issue is not present in pytest-cov 1.8.X. * Tue May 12 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 2014 toddrme2178@gmail.com - Update to 1.7.0 * No upstream changelog * Mon Aug 12 2013 speilicke@suse.com - Initial version