2013-08-18 20:35:19 +00:00
#
# spec file for package python-pytest-cov
#
2020-01-15 12:50:38 +00:00
# Copyright (c) 2020 SUSE LLC
2013-08-18 20:35:19 +00:00
#
# 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.
2018-11-08 08:39:40 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2015-05-16 17:01:48 +00:00
#
2013-08-18 20:35:19 +00:00
2017-04-20 18:50:03 +00:00
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
2013-08-18 20:35:19 +00:00
Name : python-pytest-cov
2020-08-21 14:21:57 +00:00
Version : 2.10.1
2013-08-18 20:35:19 +00:00
Release : 0
Summary : Pytest plugin for coverage reporting
2015-05-16 17:01:48 +00:00
License : MIT
2018-11-08 08:39:40 +00:00
URL : https://github.com/schlamar/pytest-cov
Source : https://files.pythonhosted.org/packages/source/p/pytest-cov/pytest-cov-%{version} .tar.gz
2019-02-13 13:12:48 +00:00
BuildRequires : %{python_module coverage >= 4.4}
BuildRequires : %{python_module fields}
BuildRequires : %{python_module process-tests}
2020-06-29 10:11:39 +00:00
BuildRequires : %{python_module pytest >= 4.6.0}
BuildRequires : %{python_module pytest-xdist >= 1.32.0}
2017-04-20 18:50:03 +00:00
BuildRequires : %{python_module setuptools}
2019-02-13 13:12:48 +00:00
BuildRequires : %{python_module six}
BuildRequires : %{python_module virtualenv}
2018-11-08 08:39:40 +00:00
BuildRequires : fdupes
2017-04-20 18:50:03 +00:00
BuildRequires : python-rpm-macros
2018-11-08 08:39:40 +00:00
Requires : python-coverage >= 4.4
2020-06-29 10:11:39 +00:00
Requires : python-pytest >= 4.6.0
2013-08-18 20:35:19 +00:00
BuildArch : noarch
2017-04-20 18:50:03 +00:00
%python_subpackages
2013-08-18 20:35:19 +00:00
%description
2017-04-20 18:50:03 +00:00
This plugin produces coverage reports. It supports centralised testing
and distributed testing in both load and each modes. It also supports
coverage of subprocesses.
2013-08-18 20:35:19 +00:00
2017-04-20 18:50:03 +00:00
All features offered by the coverage package should be available, either
through pytest-cov or through coverage's config file.
2013-08-18 20:35:19 +00:00
%prep
%setup -q -n pytest-cov-%{version}
%build
2017-04-20 18:50:03 +00:00
%python_build
2013-08-18 20:35:19 +00:00
%install
2017-04-20 18:50:03 +00:00
%python_install
2018-11-08 08:39:40 +00:00
%python_expand %fdupes %{buildroot} %{$python_sitelib}/
2013-08-18 20:35:19 +00:00
2019-02-13 13:12:48 +00:00
%check
# 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
2020-06-09 08:12:29 +00:00
export PYTHONDONTWRITEBYTECODE=1
2019-02-13 13:12:48 +00:00
echo " i m p o r t s i t e ; s i t e . a d d s i t e d i r ( \" $ ( p w d ) / s r c \" ) " > tests/sitecustomize.py
2020-06-29 10:11:39 +00:00
%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)'
2019-02-13 13:12:48 +00:00
2017-04-20 18:50:03 +00:00
%files %{python_files}
2018-11-08 08:39:40 +00:00
%license LICENSE
%doc AUTHORS.rst CHANGELOG.rst README.rst
2017-04-20 18:50:03 +00:00
%{python_sitelib} /pytest-cov.pth
%{python_sitelib} /pytest_cov
%{python_sitelib} /pytest_cov-%{version} -py%{python_version} .egg-info
2013-08-18 20:35:19 +00:00
%changelog