Hello community,
here is the log from the commit of package python-pytest-cov for
openSUSE:Factory checked in at 2020-06-11 14:45:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-cov (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-cov.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-cov"
Thu Jun 11 14:45:34 2020 rev:16 rq:812819 version:2.9.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-cov/python-pytest-cov.changes
2020-01-16 18:16:34.788816619 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-cov.new.3606/python-pytest-cov.changes
2020-06-11 14:46:00.673611343 +0200
@@ -1,0 +2,13 @@
+Tue Jun 9 08:07:16 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- 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
+
+-------------------------------------------------------------------
Old:
----
pytest-cov-2.8.1.tar.gz
New:
----
pytest-cov-2.9.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-cov.spec ++++++
--- /var/tmp/diff_new_pack.06vEzw/_old 2020-06-11 14:46:01.921614978 +0200
+++ /var/tmp/diff_new_pack.06vEzw/_new 2020-06-11 14:46:01.929615001 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-cov
-Version: 2.8.1
+Version: 2.9.0
Release: 0
Summary: Pytest plugin for coverage reporting
License: MIT
@@ -61,11 +61,9 @@
# 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
+export PYTHONDONTWRITEBYTECODE=1
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)'
+%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)'
%files %{python_files}
%license LICENSE
++++++ pytest-cov-2.8.1.tar.gz -> pytest-cov-2.9.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/.bumpversion.cfg
new/pytest-cov-2.9.0/.bumpversion.cfg
--- old/pytest-cov-2.8.1/.bumpversion.cfg 2019-10-05 14:52:21.000000000
+0200
+++ new/pytest-cov-2.9.0/.bumpversion.cfg 2020-05-22 19:12:42.000000000
+0200
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 2.8.1
+current_version = 2.9.0
commit = True
tag = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-cov-2.8.1/.github/ISSUE_TEMPLATE/bug_report.md
new/pytest-cov-2.9.0/.github/ISSUE_TEMPLATE/bug_report.md
--- old/pytest-cov-2.8.1/.github/ISSUE_TEMPLATE/bug_report.md 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-cov-2.9.0/.github/ISSUE_TEMPLATE/bug_report.md 2020-01-12
20:40:03.000000000 +0100
@@ -0,0 +1,32 @@
+---
+name: 🐞 Bug report
+about: There a problem with how pytest-cov or coverage works
+---
+
+# Summary
+
+## Expected vs actual result
+
+# Reproducer
+
+## Versions
+
+Output of relevant packages `pip list`, `python --version`, `pytest --version`
etc.
+
+Make sure you include complete output of `tox` if you use it (it will show
versions of various things).
+
+## Config
+
+Include your `tox.ini`, `pytest.ini`, `.coveragerc`, `setup.cfg` or any
relevant configuration.
+
+## Code
+
+Link to your repository, gist, pastebin or just paste raw code that
illustrates the issue.
+
+If you paste raw code make sure you quote it, eg:
+
+```python
+def foobar():
+ pass
+```
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-cov-2.8.1/.github/ISSUE_TEMPLATE/feature_request.md
new/pytest-cov-2.9.0/.github/ISSUE_TEMPLATE/feature_request.md
--- old/pytest-cov-2.8.1/.github/ISSUE_TEMPLATE/feature_request.md
1970-01-01 01:00:00.000000000 +0100
+++ new/pytest-cov-2.9.0/.github/ISSUE_TEMPLATE/feature_request.md
2020-01-12 20:40:03.000000000 +0100
@@ -0,0 +1,18 @@
+---
+name: ✈ Feature request
+about: Proposal for a new feature in pytest-cov
+---
+
+Before proposing please consider:
+
+* the maintenance cost of the feature
+* implementing it externally (like a shell/python script,
+ pytest plugin or something else)
+
+# Summary
+
+These questions should be answered:
+
+* why is the feature needed?
+* what problem does it solve?
+* how it is better compared to past solutions to the problem?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-cov-2.8.1/.github/ISSUE_TEMPLATE/support_request.md
new/pytest-cov-2.9.0/.github/ISSUE_TEMPLATE/support_request.md
--- old/pytest-cov-2.8.1/.github/ISSUE_TEMPLATE/support_request.md
1970-01-01 01:00:00.000000000 +0100
+++ new/pytest-cov-2.9.0/.github/ISSUE_TEMPLATE/support_request.md
2020-01-12 20:40:03.000000000 +0100
@@ -0,0 +1,40 @@
+---
+name: 🤔 Support request
+about: Request help with setting up pytest-cov in your project
+---
+
+Please go over all the sections and search
+https://pytest-cov.readthedocs.io/en/latest/ or
+https://coverage.readthedocs.io/en/latest/
+before opening the issue.
+
+# Summary
+
+## Expected vs actual result
+
+# Reproducer
+
+## Versions
+
+Output of relevant packages `pip list`, `python --version`, `pytest --version`
etc.
+
+Make sure you include complete output of `tox` if you use it (it will show
versions of various things).
+
+## Config
+
+Include your `tox.ini`, `pytest.ini`, `.coveragerc`, `setup.cfg` or any
relevant configuration.
+
+## Code
+
+Link to your repository, gist, pastebin or just paste raw code that
illustrates the issue.
+
+If you paste raw code make sure you quote it, eg:
+
+```python
+def foobar():
+ pass
+```
+
+# What has been tried to solve the problem
+
+You should outline the things you tried to solve the problem but didn't work.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/.readthedocs.yml
new/pytest-cov-2.9.0/.readthedocs.yml
--- old/pytest-cov-2.8.1/.readthedocs.yml 1970-01-01 01:00:00.000000000
+0100
+++ new/pytest-cov-2.9.0/.readthedocs.yml 2020-05-21 11:57:47.000000000
+0200
@@ -0,0 +1,9 @@
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+version: 2
+sphinx:
+ configuration: docs/conf.py
+formats: all
+python:
+ version: 3
+ install:
+ - requirements: docs/requirements.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/.travis.yml
new/pytest-cov-2.9.0/.travis.yml
--- old/pytest-cov-2.8.1/.travis.yml 2019-10-04 16:59:31.000000000 +0200
+++ new/pytest-cov-2.9.0/.travis.yml 2020-05-22 16:19:11.000000000 +0200
@@ -10,172 +10,79 @@
- lint
- examples
- tests
-matrix:
+jobs:
fast_finish: true
allow_failures:
- - python: '3.8-dev'
-jobs:
+ - python: '3.8'
include:
- stage: lint
env: TOXENV=check
- env: TOXENV=docs
- stage: tests
- env: TOXENV=py27-pytest310-xdist27-coverage45
+ env: TOXENV=py27-pytest46-xdist27-coverage45
python: '2.7'
- - env: TOXENV=py27-pytest46-xdist27-coverage45
+ - env: TOXENV=py27-pytest46-xdist27-coverage51
python: '2.7'
- - env: TOXENV=py34-pytest310-xdist27-coverage45
- python: '3.4'
- - env: TOXENV=py34-pytest46-xdist27-coverage45
- python: '3.4'
- - env: TOXENV=py35-pytest310-xdist27-coverage45
- python: '3.5'
- env: TOXENV=py35-pytest46-xdist27-coverage45
python: '3.5'
- - env: TOXENV=py36-pytest310-xdist27-coverage45
- python: '3.6'
- - env: TOXENV=py36-pytest46-xdist27-coverage45
- python: '3.6'
- - env: TOXENV=py37-pytest310-xdist27-coverage45
- python: '3.7'
- - env: TOXENV=py37-pytest46-xdist27-coverage45
- python: '3.7'
- - env: TOXENV=pypy-pytest310-xdist27-coverage45
- python: 'pypy'
- - env: TOXENV=pypy-pytest46-xdist27-coverage45
- python: 'pypy'
- - env: TOXENV=pypy3-pytest310-xdist27-coverage45
- python: 'pypy3'
- - env: TOXENV=pypy3-pytest46-xdist27-coverage45
- python: 'pypy3'
- - env: TOXENV=py27-pytest310-xdist27-coverage50
- python: '2.7'
- - env: TOXENV=py27-pytest46-xdist27-coverage50
- python: '2.7'
- - env: TOXENV=py35-pytest310-xdist27-coverage50
- python: '3.5'
- - env: TOXENV=py35-pytest46-xdist27-coverage50
+ - env: TOXENV=py35-pytest46-xdist27-coverage51
python: '3.5'
- - env: TOXENV=py36-pytest310-xdist27-coverage50
+ - env: TOXENV=py36-pytest46-xdist27-coverage45
python: '3.6'
- - env: TOXENV=py36-pytest46-xdist27-coverage50
+ - env: TOXENV=py36-pytest46-xdist27-coverage51
python: '3.6'
- - env: TOXENV=py37-pytest310-xdist27-coverage50
+ - env: TOXENV=py37-pytest46-xdist27-coverage45
python: '3.7'
- - env: TOXENV=py37-pytest46-xdist27-coverage50
+ - env: TOXENV=py37-pytest46-xdist27-coverage51
python: '3.7'
- - env: TOXENV=pypy-pytest310-xdist27-coverage50
+ - env: TOXENV=pypy-pytest46-xdist27-coverage45
python: 'pypy'
- - env: TOXENV=pypy-pytest46-xdist27-coverage50
+ - env: TOXENV=pypy-pytest46-xdist27-coverage51
python: 'pypy'
- - env: TOXENV=pypy3-pytest310-xdist27-coverage50
+ - env: TOXENV=pypy3-pytest46-xdist27-coverage45
python: 'pypy3'
- - env: TOXENV=pypy3-pytest46-xdist27-coverage50
+ - env: TOXENV=pypy3-pytest46-xdist27-coverage51
python: 'pypy3'
- - env: TOXENV=py36-pytest46-xdist29-coverage45
- python: '3.6'
- - env: TOXENV=py36-pytest46-xdist29-coverage50
- python: '3.6'
- - env: TOXENV=py36-pytest46-xdist30-coverage45
+ - env: TOXENV=py36-pytest46-xdist32-coverage45
python: '3.6'
- - env: TOXENV=py36-pytest46-xdist30-coverage50
+ - env: TOXENV=py36-pytest46-xdist32-coverage51
python: '3.6'
- - env: TOXENV=py36-pytest51-xdist29-coverage45
+ - env: TOXENV=py36-pytest54-xdist32-coverage45
python: '3.6'
- - env: TOXENV=py36-pytest51-xdist29-coverage50
+ - env: TOXENV=py36-pytest54-xdist32-coverage51
python: '3.6'
- - env: TOXENV=py36-pytest51-xdist30-coverage45
- python: '3.6'
- - env: TOXENV=py36-pytest51-xdist30-coverage50
- python: '3.6'
- - env: TOXENV=py36-pytest52-xdist29-coverage45
- python: '3.6'
- - env: TOXENV=py36-pytest52-xdist29-coverage50
- python: '3.6'
- - env: TOXENV=py36-pytest52-xdist30-coverage45
- python: '3.6'
- - env: TOXENV=py36-pytest52-xdist30-coverage50
- python: '3.6'
- - env: TOXENV=py37-pytest46-xdist29-coverage45
- python: '3.7'
- - env: TOXENV=py37-pytest46-xdist29-coverage50
- python: '3.7'
- - env: TOXENV=py37-pytest46-xdist30-coverage45
- python: '3.7'
- - env: TOXENV=py37-pytest46-xdist30-coverage50
- python: '3.7'
- - env: TOXENV=py37-pytest51-xdist29-coverage45
- python: '3.7'
- - env: TOXENV=py37-pytest51-xdist29-coverage50
- python: '3.7'
- - env: TOXENV=py37-pytest51-xdist30-coverage45
+ - env: TOXENV=py37-pytest46-xdist32-coverage45
python: '3.7'
- - env: TOXENV=py37-pytest51-xdist30-coverage50
+ - env: TOXENV=py37-pytest46-xdist32-coverage51
python: '3.7'
- - env: TOXENV=py37-pytest52-xdist29-coverage45
+ - env: TOXENV=py37-pytest54-xdist32-coverage45
python: '3.7'
- - env: TOXENV=py37-pytest52-xdist29-coverage50
+ - env: TOXENV=py37-pytest54-xdist32-coverage51
python: '3.7'
- - env: TOXENV=py37-pytest52-xdist30-coverage45
- python: '3.7'
- - env: TOXENV=py37-pytest52-xdist30-coverage50
- python: '3.7'
- - env: TOXENV=py38-pytest46-xdist29-coverage45
- python: '3.8-dev'
- - env: TOXENV=py38-pytest46-xdist29-coverage50
- python: '3.8-dev'
- - env: TOXENV=py38-pytest46-xdist30-coverage45
- python: '3.8-dev'
- - env: TOXENV=py38-pytest46-xdist30-coverage50
- python: '3.8-dev'
- - env: TOXENV=py38-pytest51-xdist29-coverage45
- python: '3.8-dev'
- - env: TOXENV=py38-pytest51-xdist29-coverage50
- python: '3.8-dev'
- - env: TOXENV=py38-pytest51-xdist30-coverage45
- python: '3.8-dev'
- - env: TOXENV=py38-pytest51-xdist30-coverage50
- python: '3.8-dev'
- - env: TOXENV=py38-pytest52-xdist29-coverage45
- python: '3.8-dev'
- - env: TOXENV=py38-pytest52-xdist29-coverage50
- python: '3.8-dev'
- - env: TOXENV=py38-pytest52-xdist30-coverage45
- python: '3.8-dev'
- - env: TOXENV=py38-pytest52-xdist30-coverage50
- python: '3.8-dev'
- - env: TOXENV=pypy3-pytest46-xdist29-coverage45
- python: 'pypy3'
- - env: TOXENV=pypy3-pytest46-xdist29-coverage50
- python: 'pypy3'
- - env: TOXENV=pypy3-pytest46-xdist30-coverage45
- python: 'pypy3'
- - env: TOXENV=pypy3-pytest46-xdist30-coverage50
- python: 'pypy3'
- - env: TOXENV=pypy3-pytest51-xdist29-coverage45
+ - env: TOXENV=py38-pytest46-xdist32-coverage45
+ python: '3.8'
+ - env: TOXENV=py38-pytest46-xdist32-coverage51
+ python: '3.8'
+ - env: TOXENV=py38-pytest54-xdist32-coverage45
+ python: '3.8'
+ - env: TOXENV=py38-pytest54-xdist32-coverage51
+ python: '3.8'
+ - env: TOXENV=pypy3-pytest46-xdist32-coverage45
python: 'pypy3'
- - env: TOXENV=pypy3-pytest51-xdist29-coverage50
+ - env: TOXENV=pypy3-pytest46-xdist32-coverage51
python: 'pypy3'
- - env: TOXENV=pypy3-pytest51-xdist30-coverage45
+ - env: TOXENV=pypy3-pytest54-xdist32-coverage45
python: 'pypy3'
- - env: TOXENV=pypy3-pytest51-xdist30-coverage50
- python: 'pypy3'
- - env: TOXENV=pypy3-pytest52-xdist29-coverage45
- python: 'pypy3'
- - env: TOXENV=pypy3-pytest52-xdist29-coverage50
- python: 'pypy3'
- - env: TOXENV=pypy3-pytest52-xdist30-coverage45
- python: 'pypy3'
- - env: TOXENV=pypy3-pytest52-xdist30-coverage50
+ - env: TOXENV=pypy3-pytest54-xdist32-coverage51
python: 'pypy3'
- stage: examples
- python: '3.6'
+ python: '3.8'
script: cd $TARGET; tox -v
env:
- TARGET=examples/src-layout
- - python: '3.6'
+ - python: '3.8'
script: cd $TARGET; tox -v
env:
- TARGET=examples/adhoc-layout
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/AUTHORS.rst
new/pytest-cov-2.9.0/AUTHORS.rst
--- old/pytest-cov-2.8.1/AUTHORS.rst 2019-10-04 16:59:31.000000000 +0200
+++ new/pytest-cov-2.9.0/AUTHORS.rst 2020-01-12 20:40:03.000000000 +0100
@@ -36,3 +36,5 @@
* Albert Tugushev - https://github.com/atugushev
* Martín Gaitán - https://github.com/mgaitan
* Hugo van Kemenade - https://github.com/hugovk
+* Michael Manganiello - https://github.com/adamantike
+* Anders Hovmöller - https://github.com/boxed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/CHANGELOG.rst
new/pytest-cov-2.9.0/CHANGELOG.rst
--- old/pytest-cov-2.8.1/CHANGELOG.rst 2019-10-05 14:51:52.000000000 +0200
+++ new/pytest-cov-2.9.0/CHANGELOG.rst 2020-05-22 19:11:15.000000000 +0200
@@ -1,6 +1,31 @@
Changelog
=========
+2.9.0 (2020-05-22)
+------------------
+
+* Fixed ``RemovedInPytest4Warning`` when using Pytest 3.10.
+ Contributed by Michael Manganiello in `#354
<https://github.com/pytest-dev/pytest-cov/pull/354>`_.
+* Made pytest startup faster when plugin not active by lazy-importing.
+ Contributed by Anders Hovmöller in `#339
<https://github.com/pytest-dev/pytest-cov/pull/339>`_.
+* Various CI improvements.
+ Contributed by Daniel Hahler in `#363
<https://github.com/pytest-dev/pytest-cov/pull/>`_ and
+ `#364 <https://github.com/pytest-dev/pytest-cov/pull/364>`_.
+* Various Python support updates (drop EOL 3.4, test against 3.8 final).
+ Contributed by Hugo van Kemenade in
+ `#336 <https://github.com/pytest-dev/pytest-cov/pull/336>`_ and
+ `#367 <https://github.com/pytest-dev/pytest-cov/pull/367>`_.
+* Changed ``--cov-append`` to always enable ``data_suffix`` (a coverage
setting).
+ Contributed by Harm Geerts in
+ `#387 <https://github.com/pytest-dev/pytest-cov/pull/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 <https://github.com/pytest-dev/pytest-cov/issues/306>`_ and
+ `coveragepy#881 <https://github.com/nedbat/coveragepy/issues/881>`_
+
2.8.1 (2019-10-05)
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/MANIFEST.in
new/pytest-cov-2.9.0/MANIFEST.in
--- old/pytest-cov-2.8.1/MANIFEST.in 2019-05-03 10:25:39.000000000 +0200
+++ new/pytest-cov-2.9.0/MANIFEST.in 2020-05-22 19:11:28.000000000 +0200
@@ -16,6 +16,7 @@
include .editorconfig
include .isort.cfg
include .pylintrc
+include .readthedocs.yml
include AUTHORS.rst
include CHANGELOG.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/PKG-INFO
new/pytest-cov-2.9.0/PKG-INFO
--- old/pytest-cov-2.8.1/PKG-INFO 2019-10-05 14:52:35.000000000 +0200
+++ new/pytest-cov-2.9.0/PKG-INFO 2020-05-22 19:12:47.456804500 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pytest-cov
-Version: 2.8.1
+Version: 2.9.0
Summary: Pytest plugin for measuring coverage.
Home-page: https://github.com/pytest-dev/pytest-cov
Author: Marc Schlaich
@@ -46,9 +46,9 @@
.. |conda-forge| image::
https://img.shields.io/conda/vn/conda-forge/pytest-cov.svg
:target: https://anaconda.org/conda-forge/pytest-cov
- .. |commits-since| image::
https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.8.1.svg
+ .. |commits-since| image::
https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.9.0.svg
:alt: Commits since latest release
- :target:
https://github.com/pytest-dev/pytest-cov/compare/v2.8.1...master
+ :target:
https://github.com/pytest-dev/pytest-cov/compare/v2.9.0...master
.. |wheel| image:: https://img.shields.io/pypi/wheel/pytest-cov.svg
:alt: PyPI Wheel
@@ -177,6 +177,31 @@
Changelog
=========
+ 2.9.0 (2020-05-22)
+ ------------------
+
+ * Fixed ``RemovedInPytest4Warning`` when using Pytest 3.10.
+ Contributed by Michael Manganiello in `#354
<https://github.com/pytest-dev/pytest-cov/pull/354>`_.
+ * Made pytest startup faster when plugin not active by lazy-importing.
+ Contributed by Anders Hovmöller in `#339
<https://github.com/pytest-dev/pytest-cov/pull/339>`_.
+ * Various CI improvements.
+ Contributed by Daniel Hahler in `#363
<https://github.com/pytest-dev/pytest-cov/pull/>`_ and
+ `#364 <https://github.com/pytest-dev/pytest-cov/pull/364>`_.
+ * Various Python support updates (drop EOL 3.4, test against 3.8
final).
+ Contributed by Hugo van Kemenade in
+ `#336 <https://github.com/pytest-dev/pytest-cov/pull/336>`_ and
+ `#367 <https://github.com/pytest-dev/pytest-cov/pull/367>`_.
+ * Changed ``--cov-append`` to always enable ``data_suffix`` (a
coverage setting).
+ Contributed by Harm Geerts in
+ `#387 <https://github.com/pytest-dev/pytest-cov/pull/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 <https://github.com/pytest-dev/pytest-cov/issues/306>`_ and
+ `coveragepy#881 <https://github.com/nedbat/coveragepy/issues/881>`_
+
2.8.1 (2019-10-05)
------------------
@@ -396,13 +421,13 @@
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Utilities
-Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
Provides-Extra: testing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/README.rst
new/pytest-cov-2.9.0/README.rst
--- old/pytest-cov-2.8.1/README.rst 2019-10-05 14:52:21.000000000 +0200
+++ new/pytest-cov-2.9.0/README.rst 2020-05-22 19:12:42.000000000 +0200
@@ -38,9 +38,9 @@
.. |conda-forge| image::
https://img.shields.io/conda/vn/conda-forge/pytest-cov.svg
:target: https://anaconda.org/conda-forge/pytest-cov
-.. |commits-since| image::
https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.8.1.svg
+.. |commits-since| image::
https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.9.0.svg
:alt: Commits since latest release
- :target: https://github.com/pytest-dev/pytest-cov/compare/v2.8.1...master
+ :target: https://github.com/pytest-dev/pytest-cov/compare/v2.9.0...master
.. |wheel| image:: https://img.shields.io/pypi/wheel/pytest-cov.svg
:alt: PyPI Wheel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/appveyor.yml
new/pytest-cov-2.9.0/appveyor.yml
--- old/pytest-cov-2.8.1/appveyor.yml 2019-10-04 16:59:31.000000000 +0200
+++ new/pytest-cov-2.9.0/appveyor.yml 2020-05-22 16:19:11.000000000 +0200
@@ -4,12 +4,11 @@
environment:
matrix:
- TOXENV: check
- - TOXENV:
'py27-pytest310-xdist27-coverage45,py27-pytest46-xdist27-coverage45,py27-pytest310-xdist27-coverage50,py27-pytest46-xdist27-coverage50'
- - TOXENV:
'py34-pytest310-xdist27-coverage45,py34-pytest46-xdist27-coverage45'
- - TOXENV:
'py35-pytest310-xdist27-coverage45,py35-pytest46-xdist27-coverage45,py35-pytest310-xdist27-coverage50,py35-pytest46-xdist27-coverage50'
- - TOXENV:
'py36-pytest310-xdist27-coverage45,py36-pytest46-xdist27-coverage45,py36-pytest310-xdist27-coverage50,py36-pytest46-xdist27-coverage50,py36-pytest46-xdist29-coverage45,py36-pytest46-xdist29-coverage50,py36-pytest46-xdist30-coverage45,py36-pytest46-xdist30-coverage50,py36-pytest51-xdist29-coverage45,py36-pytest51-xdist29-coverage50,py36-pytest51-xdist30-coverage45,py36-pytest51-xdist30-coverage50,py36-pytest52-xdist29-coverage45,py36-pytest52-xdist29-coverage50,py36-pytest52-xdist30-coverage45,py36-pytest52-xdist30-coverage50'
- - TOXENV:
'py37-pytest310-xdist27-coverage45,py37-pytest46-xdist27-coverage45,py37-pytest310-xdist27-coverage50,py37-pytest46-xdist27-coverage50,py37-pytest46-xdist29-coverage45,py37-pytest46-xdist29-coverage50,py37-pytest46-xdist30-coverage45,py37-pytest46-xdist30-coverage50,py37-pytest51-xdist29-coverage45,py37-pytest51-xdist29-coverage50,py37-pytest51-xdist30-coverage45,py37-pytest51-xdist30-coverage50,py37-pytest52-xdist29-coverage45,py37-pytest52-xdist29-coverage50,py37-pytest52-xdist30-coverage45,py37-pytest52-xdist30-coverage50'
- - TOXENV:
'pypy-pytest310-xdist27-coverage45,pypy-pytest46-xdist27-coverage45,pypy-pytest310-xdist27-coverage50,pypy-pytest46-xdist27-coverage50'
+ - TOXENV:
'py27-pytest46-xdist27-coverage45,py27-pytest46-xdist27-coverage51'
+ - TOXENV:
'py35-pytest46-xdist27-coverage45,py35-pytest46-xdist27-coverage51'
+ - TOXENV:
'py36-pytest46-xdist27-coverage45,py36-pytest46-xdist27-coverage51,py36-pytest46-xdist32-coverage45,py36-pytest46-xdist32-coverage51,py36-pytest54-xdist32-coverage45,py36-pytest54-xdist32-coverage51'
+ - TOXENV:
'py37-pytest46-xdist27-coverage45,py37-pytest46-xdist27-coverage51,py37-pytest46-xdist32-coverage45,py37-pytest46-xdist32-coverage51,py37-pytest54-xdist32-coverage45,py37-pytest54-xdist32-coverage51'
+ - TOXENV:
'pypy-pytest46-xdist27-coverage45,pypy-pytest46-xdist27-coverage51'
init:
- ps: echo $env:TOXENV
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/ci/templates/.travis.yml
new/pytest-cov-2.9.0/ci/templates/.travis.yml
--- old/pytest-cov-2.8.1/ci/templates/.travis.yml 2019-09-26
02:22:10.000000000 +0200
+++ new/pytest-cov-2.9.0/ci/templates/.travis.yml 2020-05-10
20:22:06.000000000 +0200
@@ -9,11 +9,10 @@
- lint
- examples
- tests
-matrix:
+jobs:
fast_finish: true
allow_failures:
- - python: '3.8-dev'
-jobs:
+ - python: '3.8'
include:
- stage: lint
env: TOXENV=check
@@ -27,8 +26,6 @@
python: 'pypy'
{% elif env.startswith("pypy3-") %}
python: 'pypy3'
- {% elif env.startswith("py38-") %}
- python: '3.8-dev'
{% else %}
python: '{{ "{0[2]}.{0[3]}".format(env) }}'
{% endif -%}
@@ -37,7 +34,7 @@
- stage: examples
{%- for example in ['src', 'adhoc'] %}{{ '' }}
{%+ if not loop.first %}- {% else %} {% endif -%}
- python: '3.6'
+ python: '3.8'
script: cd $TARGET; tox -v
env:
- TARGET=examples/{{ example }}-layout
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/ci/templates/appveyor.yml
new/pytest-cov-2.9.0/ci/templates/appveyor.yml
--- old/pytest-cov-2.8.1/ci/templates/appveyor.yml 2019-09-26
02:22:10.000000000 +0200
+++ new/pytest-cov-2.9.0/ci/templates/appveyor.yml 2020-05-22
16:18:21.000000000 +0200
@@ -4,7 +4,6 @@
matrix:
- TOXENV: check
- TOXENV: '{{ py27_environments|join(",") }}'
- - TOXENV: '{{ py34_environments|join(",") }}'
- TOXENV: '{{ py35_environments|join(",") }}'
- TOXENV: '{{ py36_environments|join(",") }}'
- TOXENV: '{{ py37_environments|join(",") }}'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/docs/conf.py
new/pytest-cov-2.9.0/docs/conf.py
--- old/pytest-cov-2.8.1/docs/conf.py 2019-10-05 14:52:21.000000000 +0200
+++ new/pytest-cov-2.9.0/docs/conf.py 2020-05-22 19:12:42.000000000 +0200
@@ -25,7 +25,7 @@
year = '2016'
author = 'pytest-cov contributors'
copyright = '{}, {}'.format(year, author)
-version = release = '2.8.1'
+version = release = '2.9.0'
pygments_style = 'trac'
templates_path = ['.']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/docs/plugins.rst
new/pytest-cov-2.9.0/docs/plugins.rst
--- old/pytest-cov-2.8.1/docs/plugins.rst 2019-03-25 14:17:13.000000000
+0100
+++ new/pytest-cov-2.9.0/docs/plugins.rst 2020-01-12 20:20:51.000000000
+0100
@@ -6,7 +6,7 @@
entrypoints) it doesn't allow controlling the order in which the plugins load.
See `pytest/issues/935
<https://github.com/pytest-dev/pytest/issues/935#issuecomment-245107960>`_ for
technical details.
-The current way of dealing with this problem is using the append feature and
manually starting ``pytest-cov``'s engine, eg:
+The current way of dealing with this problem is using the append feature and
manually starting ``pytest-cov``'s engine, eg::
COV_CORE_SOURCE=src COV_CORE_CONFIG=.coveragerc
COV_CORE_DATAFILE=.coverage.eager pytest --cov=src --cov-append
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/docs/releasing.rst
new/pytest-cov-2.9.0/docs/releasing.rst
--- old/pytest-cov-2.8.1/docs/releasing.rst 2019-01-06 19:11:51.000000000
+0100
+++ new/pytest-cov-2.9.0/docs/releasing.rst 2020-01-12 20:20:51.000000000
+0100
@@ -26,7 +26,7 @@
These files need to be removed to force distutils/setuptools to rebuild
everything and recreate the egg-info metadata.
#. Build the dists::
- python3.4 setup.py clean --all sdist bdist_wheel
+ python3 setup.py clean --all sdist bdist_wheel
#. Verify that the resulting archives (found in ``dist/``) are good.
#. Upload the sdist and wheel with twine::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/docs/requirements.txt
new/pytest-cov-2.9.0/docs/requirements.txt
--- old/pytest-cov-2.8.1/docs/requirements.txt 2019-01-06 19:11:51.000000000
+0100
+++ new/pytest-cov-2.9.0/docs/requirements.txt 2020-05-21 11:58:16.000000000
+0200
@@ -1,4 +1,4 @@
-sphinx==1.5.6 # rq.filter: >=1.3,<1.6
-sphinx-py3doc-enhanced-theme
-docutils==0.13.1
+sphinx==3.0.3
+sphinx-py3doc-enhanced-theme==2.4.0
+docutils==0.16
-e .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/docs/subprocess-support.rst
new/pytest-cov-2.9.0/docs/subprocess-support.rst
--- old/pytest-cov-2.8.1/docs/subprocess-support.rst 2019-09-04
17:33:31.000000000 +0200
+++ new/pytest-cov-2.9.0/docs/subprocess-support.rst 2020-01-12
20:40:03.000000000 +0100
@@ -39,6 +39,11 @@
If you must use the context manager API (e.g.: the pool is managed in third
party code you can't change) then you can
register a cleaning SIGTERM handler like so:
+.. warning::
+
+ **This technique cannot be used on Python 3.8** (registering signal
handlers will cause deadlocks in the pool,
+ see: https://bugs.python.org/issue38227).
+
.. code-block:: python
from multiprocessing import Pool
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/examples/adhoc-layout/tox.ini
new/pytest-cov-2.9.0/examples/adhoc-layout/tox.ini
--- old/pytest-cov-2.8.1/examples/adhoc-layout/tox.ini 2019-03-25
14:17:13.000000000 +0100
+++ new/pytest-cov-2.9.0/examples/adhoc-layout/tox.ini 2020-05-10
20:22:06.000000000 +0200
@@ -1,5 +1,5 @@
[tox]
-envlist = clean,py27,py36,report
+envlist = clean,py27,py38,report
[tool:pytest]
addopts =
@@ -9,10 +9,16 @@
commands = pytest --cov --cov-append --cov-config={toxinidir}/.coveragerc
{posargs:-vv}
deps =
pytest
- pytest-cov
+ coverage
+# Note:
+# This is here just to allow examples to be tested against
+# the current code of pytest-cov. If you copy this then
+# use "pytest-cov" instead of "../.."
+ ../..
+
depends =
- {py27,py36}: clean
- report: py27,py36
+ {py27,py38}: clean
+ report: py27,py38
# note that this is necessary to prevent the tests importing the code from
your badly laid project
changedir = tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/examples/src-layout/tox.ini
new/pytest-cov-2.9.0/examples/src-layout/tox.ini
--- old/pytest-cov-2.8.1/examples/src-layout/tox.ini 2019-03-25
14:17:13.000000000 +0100
+++ new/pytest-cov-2.9.0/examples/src-layout/tox.ini 2020-05-21
11:10:48.000000000 +0200
@@ -1,5 +1,5 @@
[tox]
-envlist = clean,py27,py36,report
+envlist = clean,py27,py38,report
[tool:pytest]
testpaths = tests
@@ -10,10 +10,16 @@
commands = pytest --cov --cov-append {posargs:-vv}
deps =
pytest
- pytest-cov
+ coverage
+# Note:
+# This is here just to allow examples to be tested against
+# the current code of pytest-cov. If you copy this then
+# use "pytest-cov" instead of "../.."
+ ../..
+
depends =
- {py27,py36}: clean
- report: py27,py36
+ {py27,py38}: clean
+ report: py27,py38
[testenv:report]
skip_install = true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/setup.cfg
new/pytest-cov-2.9.0/setup.cfg
--- old/pytest-cov-2.8.1/setup.cfg 2019-10-05 14:52:35.000000000 +0200
+++ new/pytest-cov-2.9.0/setup.cfg 2020-05-22 19:12:47.457804700 +0200
@@ -10,7 +10,6 @@
addopts =
-ra
--strict
- --tb=short
-p pytester
[isort]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/setup.py
new/pytest-cov-2.9.0/setup.py
--- old/pytest-cov-2.8.1/setup.py 2019-10-05 14:52:21.000000000 +0200
+++ new/pytest-cov-2.9.0/setup.py 2020-05-22 19:12:42.000000000 +0200
@@ -84,7 +84,7 @@
setup(
name='pytest-cov',
- version='2.8.1',
+ version='2.9.0',
license='MIT',
description='Pytest plugin for measuring coverage.',
long_description='%s\n%s' % (read('README.rst'),
re.sub(':[a-z]+:`~?(.*?)`', r'``\1``', read('CHANGELOG.rst'))),
@@ -109,10 +109,10 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Testing',
@@ -125,13 +125,14 @@
'pytest>=3.6',
'coverage>=4.4'
],
- python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
+ python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
extras_require={
'testing': [
'fields',
'hunter',
'process-tests==2.0.2',
'six',
+ 'pytest-xdist',
'virtualenv',
]
},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/src/pytest_cov/__init__.py
new/pytest-cov-2.9.0/src/pytest_cov/__init__.py
--- old/pytest-cov-2.8.1/src/pytest_cov/__init__.py 2019-10-05
14:52:21.000000000 +0200
+++ new/pytest-cov-2.9.0/src/pytest_cov/__init__.py 2020-05-22
19:12:42.000000000 +0200
@@ -1,2 +1,2 @@
"""pytest-cov: avoid already-imported warning: PYTEST_DONT_REWRITE."""
-__version__ = "2.8.1"
+__version__ = "2.9.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/src/pytest_cov/engine.py
new/pytest-cov-2.9.0/src/pytest_cov/engine.py
--- old/pytest-cov-2.8.1/src/pytest_cov/engine.py 2019-10-05
14:51:52.000000000 +0200
+++ new/pytest-cov-2.9.0/src/pytest_cov/engine.py 2020-05-22
19:11:28.000000000 +0200
@@ -1,6 +1,7 @@
"""Coverage controllers for use by pytest-cov and nose-cov."""
import contextlib
import copy
+import functools
import os
import random
import socket
@@ -31,6 +32,25 @@
setattr(obj, attr, backup)
+def _ensure_topdir(meth):
+ @functools.wraps(meth)
+ def ensure_topdir_wrapper(self, *args, **kwargs):
+ try:
+ original_cwd = os.getcwd()
+ except OSError:
+ # Looks like it's gone, this is non-ideal because a side-effect
will
+ # be introduced in the tests here but we can't do anything about
it.
+ original_cwd = None
+ os.chdir(self.topdir)
+ try:
+ return meth(self, *args, **kwargs)
+ finally:
+ if original_cwd is not None:
+ os.chdir(original_cwd)
+
+ return ensure_topdir_wrapper
+
+
class CovController(object):
"""Base class for different plugin implementations."""
@@ -50,15 +70,26 @@
self.node_descs = set()
self.failed_workers = []
self.topdir = os.getcwd()
+ self.is_collocated = None
+
+ @contextlib.contextmanager
+ def ensure_topdir(self):
+ original_cwd = os.getcwd()
+ os.chdir(self.topdir)
+ yield
+ os.chdir(original_cwd)
+ @_ensure_topdir
def pause(self):
self.cov.stop()
self.unset_env()
+ @_ensure_topdir
def resume(self):
self.cov.start()
self.set_env()
+ @_ensure_topdir
def set_env(self):
"""Put info about coverage into the env so that subprocesses can
activate coverage."""
if self.cov_source is None:
@@ -99,6 +130,7 @@
out = '%s %s %s\n' % (s * sep_len, txt, s * (sep_len + sep_extra))
stream.write(out)
+ @_ensure_topdir
def summary(self, stream):
"""Produce coverage reports."""
total = None
@@ -171,25 +203,27 @@
class Central(CovController):
"""Implementation for centralised operation."""
+ @_ensure_topdir
def start(self):
cleanup()
self.cov = coverage.Coverage(source=self.cov_source,
branch=self.cov_branch,
+ data_suffix=True,
config_file=self.cov_config)
self.combining_cov = coverage.Coverage(source=self.cov_source,
branch=self.cov_branch,
+ data_suffix=True,
data_file=os.path.abspath(self.cov.config.data_file),
config_file=self.cov_config)
# Erase or load any previous coverage data and start coverage.
- if self.cov_append:
- self.cov.load()
- else:
+ if not self.cov_append:
self.cov.erase()
self.cov.start()
self.set_env()
+ @_ensure_topdir
def finish(self):
"""Stop coverage, save data to file and set the list of coverage
objects to report on."""
@@ -209,6 +243,7 @@
class DistMaster(CovController):
"""Implementation for distributed master."""
+ @_ensure_topdir
def start(self):
cleanup()
@@ -218,14 +253,17 @@
self.cov = coverage.Coverage(source=self.cov_source,
branch=self.cov_branch,
+ data_suffix=True,
config_file=self.cov_config)
+ self.cov._warn_no_data = False
+ self.cov._warn_unimported_source = False
+ self.cov._warn_preimported_source = False
self.combining_cov = coverage.Coverage(source=self.cov_source,
branch=self.cov_branch,
+ data_suffix=True,
data_file=os.path.abspath(self.cov.config.data_file),
config_file=self.cov_config)
- if self.cov_append:
- self.cov.load()
- else:
+ if not self.cov_append:
self.cov.erase()
self.cov.start()
self.cov.config.paths['source'] = [self.topdir]
@@ -256,7 +294,7 @@
socket.gethostname(), os.getpid(),
random.randint(0, 999999),
output['cov_worker_node_id']
- )
+ )
cov = coverage.Coverage(source=self.cov_source,
branch=self.cov_branch,
@@ -281,6 +319,7 @@
node_desc = self.get_node_desc(rinfo.platform, rinfo.version_info)
self.node_descs.add(node_desc)
+ @_ensure_topdir
def finish(self):
"""Combines coverage data and sets the list of coverage objects to
report on."""
@@ -296,7 +335,9 @@
class DistWorker(CovController):
"""Implementation for distributed workers."""
+ @_ensure_topdir
def start(self):
+
cleanup()
# Determine whether we are collocated with master.
@@ -320,6 +361,7 @@
self.cov.start()
self.set_env()
+ @_ensure_topdir
def finish(self):
"""Stop coverage and send relevant info back to the master."""
self.unset_env()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/src/pytest_cov/plugin.py
new/pytest-cov-2.9.0/src/pytest_cov/plugin.py
--- old/pytest-cov-2.8.1/src/pytest_cov/plugin.py 2019-10-04
16:59:31.000000000 +0200
+++ new/pytest-cov-2.9.0/src/pytest_cov/plugin.py 2020-05-22
19:11:28.000000000 +0200
@@ -5,11 +5,11 @@
import coverage
import pytest
-from coverage.misc import CoverageException
from . import compat
from . import embed
-from . import engine
+
+PYTEST_VERSION = tuple(map(int, pytest.__version__.split('.')[:3]))
class CoverageError(Exception):
@@ -142,6 +142,7 @@
self.cov_total = None
self.failed = False
self._started = False
+ self._start_path = None
self._disabled = False
self.options = options
@@ -158,6 +159,10 @@
self.options.cov_report = {}
self.options.cov_source = _prepare_cov_source(self.options.cov_source)
+ # import engine lazily here to avoid importing
+ # it for unit tests that don't need it
+ from . import engine
+
if is_dist and start:
self.start(engine.DistMaster)
elif start:
@@ -185,6 +190,7 @@
)
self.cov_controller.start()
self._started = True
+ self._start_path = os.getcwd()
cov_config = self.cov_controller.cov.config
if self.options.cov_fail_under is None and hasattr(cov_config,
'fail_under'):
self.options.cov_fail_under = cov_config.fail_under
@@ -200,6 +206,10 @@
self._disabled = True
return
+ # import engine lazily here to avoid importing
+ # it for unit tests that don't need it
+ from . import engine
+
self.pid = os.getpid()
if self._is_worker(session):
nodeid = (
@@ -254,13 +264,18 @@
self.cov_controller.finish()
if not self._is_worker(session) and self._should_report():
+
+ # import coverage lazily here to avoid importing
+ # it for unit tests that don't need it
+ from coverage.misc import CoverageException
+
try:
self.cov_total = self.cov_controller.summary(self.cov_report)
except CoverageException as exc:
message = 'Failed to generate report: %s\n' % exc
session.config.pluginmanager.getplugin("terminalreporter").write(
'WARNING: %s\n' % message, red=True, bold=True)
- if pytest.__version__ >= '3.8':
+ if PYTEST_VERSION >= (3, 8):
warnings.warn(pytest.PytestWarning(message))
else:
session.config.warn(code='COV-2', message=message)
@@ -274,7 +289,7 @@
if self._disabled:
message = 'Coverage disabled via --no-cov switch!'
terminalreporter.write('WARNING: %s\n' % message, red=True,
bold=True)
- if pytest.__version__ >= '3.8':
+ if PYTEST_VERSION >= (3, 8):
warnings.warn(pytest.PytestWarning(message))
else:
terminalreporter.config.warn(code='COV-1', message=message)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/src/pytest_cov.egg-info/PKG-INFO
new/pytest-cov-2.9.0/src/pytest_cov.egg-info/PKG-INFO
--- old/pytest-cov-2.8.1/src/pytest_cov.egg-info/PKG-INFO 2019-10-05
14:52:35.000000000 +0200
+++ new/pytest-cov-2.9.0/src/pytest_cov.egg-info/PKG-INFO 2020-05-22
19:12:47.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pytest-cov
-Version: 2.8.1
+Version: 2.9.0
Summary: Pytest plugin for measuring coverage.
Home-page: https://github.com/pytest-dev/pytest-cov
Author: Marc Schlaich
@@ -46,9 +46,9 @@
.. |conda-forge| image::
https://img.shields.io/conda/vn/conda-forge/pytest-cov.svg
:target: https://anaconda.org/conda-forge/pytest-cov
- .. |commits-since| image::
https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.8.1.svg
+ .. |commits-since| image::
https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.9.0.svg
:alt: Commits since latest release
- :target:
https://github.com/pytest-dev/pytest-cov/compare/v2.8.1...master
+ :target:
https://github.com/pytest-dev/pytest-cov/compare/v2.9.0...master
.. |wheel| image:: https://img.shields.io/pypi/wheel/pytest-cov.svg
:alt: PyPI Wheel
@@ -177,6 +177,31 @@
Changelog
=========
+ 2.9.0 (2020-05-22)
+ ------------------
+
+ * Fixed ``RemovedInPytest4Warning`` when using Pytest 3.10.
+ Contributed by Michael Manganiello in `#354
<https://github.com/pytest-dev/pytest-cov/pull/354>`_.
+ * Made pytest startup faster when plugin not active by lazy-importing.
+ Contributed by Anders Hovmöller in `#339
<https://github.com/pytest-dev/pytest-cov/pull/339>`_.
+ * Various CI improvements.
+ Contributed by Daniel Hahler in `#363
<https://github.com/pytest-dev/pytest-cov/pull/>`_ and
+ `#364 <https://github.com/pytest-dev/pytest-cov/pull/364>`_.
+ * Various Python support updates (drop EOL 3.4, test against 3.8
final).
+ Contributed by Hugo van Kemenade in
+ `#336 <https://github.com/pytest-dev/pytest-cov/pull/336>`_ and
+ `#367 <https://github.com/pytest-dev/pytest-cov/pull/367>`_.
+ * Changed ``--cov-append`` to always enable ``data_suffix`` (a
coverage setting).
+ Contributed by Harm Geerts in
+ `#387 <https://github.com/pytest-dev/pytest-cov/pull/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 <https://github.com/pytest-dev/pytest-cov/issues/306>`_ and
+ `coveragepy#881 <https://github.com/nedbat/coveragepy/issues/881>`_
+
2.8.1 (2019-10-05)
------------------
@@ -396,13 +421,13 @@
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Utilities
-Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
Provides-Extra: testing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/src/pytest_cov.egg-info/SOURCES.txt
new/pytest-cov-2.9.0/src/pytest_cov.egg-info/SOURCES.txt
--- old/pytest-cov-2.8.1/src/pytest_cov.egg-info/SOURCES.txt 2019-10-05
14:52:35.000000000 +0200
+++ new/pytest-cov-2.9.0/src/pytest_cov.egg-info/SOURCES.txt 2020-05-22
19:12:47.000000000 +0200
@@ -3,6 +3,7 @@
.coveragerc
.editorconfig
.gitignore
+.readthedocs.yml
.travis.yml
AUTHORS.rst
CHANGELOG.rst
@@ -14,6 +15,9 @@
setup.cfg
setup.py
tox.ini
+.github/ISSUE_TEMPLATE/bug_report.md
+.github/ISSUE_TEMPLATE/feature_request.md
+.github/ISSUE_TEMPLATE/support_request.md
ci/bootstrap.py
ci/templates/.travis.yml
ci/templates/appveyor.yml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-cov-2.8.1/src/pytest_cov.egg-info/requires.txt
new/pytest-cov-2.9.0/src/pytest_cov.egg-info/requires.txt
--- old/pytest-cov-2.8.1/src/pytest_cov.egg-info/requires.txt 2019-10-05
14:52:35.000000000 +0200
+++ new/pytest-cov-2.9.0/src/pytest_cov.egg-info/requires.txt 2020-05-22
19:12:47.000000000 +0200
@@ -6,4 +6,5 @@
hunter
process-tests==2.0.2
six
+pytest-xdist
virtualenv
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/tests/test_pytest_cov.py
new/pytest-cov-2.9.0/tests/test_pytest_cov.py
--- old/pytest-cov-2.8.1/tests/test_pytest_cov.py 2019-10-05
14:51:52.000000000 +0200
+++ new/pytest-cov-2.9.0/tests/test_pytest_cov.py 2020-05-22
19:11:28.000000000 +0200
@@ -544,6 +544,46 @@
assert result.ret == 0
+@xdist_params
+def test_borken_cwd(testdir, monkeypatch, opts):
+ testdir.makepyfile(mod='''
+def foobar(a, b):
+ return a + b
+''')
+
+ script = testdir.makepyfile('''
+import os
+import tempfile
+import pytest
+import mod
+
[email protected]
+def bad():
+ path = tempfile.mkdtemp('test_borken_cwd')
+ os.chdir(path)
+ yield
+ try:
+ os.rmdir(path)
+ except OSError:
+ pass
+
+def test_foobar(bad):
+ assert mod.foobar(1, 2) == 3
+''')
+ result = testdir.runpytest('-v', '-s',
+ '--cov=mod',
+ '--cov-branch',
+ script, *opts.split())
+
+ result.stdout.fnmatch_lines([
+ '*- coverage: platform *, python * -*',
+ '*mod* 100%',
+ '*1 passed*',
+ ])
+
+ assert result.ret == 0
+
+
def test_subprocess_with_path_aliasing(testdir, monkeypatch):
src = testdir.mkdir('src')
src.join('parent_script.py').write(SCRIPT_PARENT)
@@ -680,8 +720,7 @@
'-n', '5', '-s',
script)
result.stdout.fnmatch_lines([
- '*- coverage: platform *, python * -*',
- 'test_dist_combine_racecondition* 2002 * 0 * 100%*',
+ 'test_dist_combine_racecondition* 0 * 100%*',
'*1000 passed*'
])
@@ -956,7 +995,7 @@
def test_dist_missing_data(testdir):
"""Test failure when using a worker without pytest-cov installed."""
venv_path = os.path.join(str(testdir.tmpdir), 'venv')
- virtualenv.create_environment(venv_path)
+ virtualenv.cli_run([venv_path])
if sys.platform == 'win32':
if platform.python_implementation() == "PyPy":
exe = os.path.join(venv_path, 'bin', 'python.exe')
@@ -983,10 +1022,8 @@
'--tx=popen//python=%s' % exe,
max_worker_restart_0,
script)
-
- assert result.ret == 0
result.stdout.fnmatch_lines([
- '*- coverage: failed workers -*'
+ 'The following workers failed to return coverage data, ensure that
pytest-cov is installed on these workers.'
])
@@ -1021,6 +1058,7 @@
@pytest.mark.skipif("sys.version_info[0] < 3", reason="no context manager api
on Python 2")
@pytest.mark.skipif('sys.platform == "win32"', reason="multiprocessing support
is broken on Windows")
@pytest.mark.skipif('platform.python_implementation() == "PyPy"',
reason="often deadlocks on PyPy")
[email protected]('sys.version_info[:2] == (3, 8)', reason="deadlocks on
Python 3.8, see: https://bugs.python.org/issue38227")
def test_multiprocessing_pool(testdir):
pytest.importorskip('multiprocessing.util')
@@ -1061,6 +1099,7 @@
@pytest.mark.skipif('sys.platform == "win32"', reason="multiprocessing support
is broken on Windows")
@pytest.mark.skipif('platform.python_implementation() == "PyPy"',
reason="often deadlocks on PyPy")
[email protected]('sys.version_info[:2] == (3, 8)', reason="deadlocks on
Python 3.8, see: https://bugs.python.org/issue38227")
def test_multiprocessing_pool_terminate(testdir):
pytest.importorskip('multiprocessing.util')
@@ -1814,6 +1853,25 @@
assert
glob.glob(str(testdir.tmpdir.join('some/special/place/coverage-data*')))
[email protected]('sys.platform == "win32" and
platform.python_implementation() == "PyPy"')
+def test_xdist_no_data_collected(testdir):
+ testdir.makepyfile(target="x = 123")
+ script = testdir.makepyfile("""
+import target
+def test_foobar():
+ assert target.x == 123
+""")
+ result = testdir.runpytest('-v',
+ '--cov=target',
+ '-n', '1',
+ script)
+ assert 'no-data-collected' not in result.stderr.str()
+ assert 'no-data-collected' not in result.stdout.str()
+ assert 'module-not-imported' not in result.stderr.str()
+ assert 'module-not-imported' not in result.stdout.str()
+ assert result.ret == 0
+
+
def test_external_data_file_negative(testdir):
script = testdir.makepyfile(SCRIPT)
testdir.tmpdir.join('.coveragerc').write("")
@@ -1870,6 +1928,29 @@
])
[email protected]('sys.platform == "win32" and
platform.python_implementation() == "PyPy"')
+def test_append_coverage_subprocess(testdir):
+ scripts = testdir.makepyfile(parent_script=SCRIPT_PARENT,
+ child_script=SCRIPT_CHILD)
+ parent_script = scripts.dirpath().join('parent_script.py')
+
+ result = testdir.runpytest('-v',
+ '--cov=%s' % scripts.dirpath(),
+ '--cov-append',
+ '--cov-report=term-missing',
+ '--dist=load',
+ '--tx=2*popen',
+ max_worker_restart_0,
+ parent_script)
+
+ result.stdout.fnmatch_lines([
+ '*- coverage: platform *, python * -*',
+ 'child_script* %s*' % CHILD_SCRIPT_RESULT,
+ 'parent_script* %s*' % PARENT_SCRIPT_RESULT,
+ ])
+ assert result.ret == 0
+
+
def test_pth_failure(monkeypatch):
with open('src/pytest-cov.pth') as fh:
payload = fh.read()
@@ -1934,12 +2015,12 @@
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 +2088,7 @@
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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-cov-2.8.1/tox.ini new/pytest-cov-2.9.0/tox.ini
--- old/pytest-cov-2.8.1/tox.ini 2019-10-04 16:59:31.000000000 +0200
+++ new/pytest-cov-2.9.0/tox.ini 2020-05-21 11:22:57.000000000 +0200
@@ -3,9 +3,8 @@
[tox]
envlist =
check
- py{27,34,35,36,37,py,py3}-pytest{310,46}-xdist27-coverage45
- py{27,35,36,37,py,py3}-pytest{310,46}-xdist27-coverage50
- py{36,37,38,py3}-pytest{46,51,52}-xdist{29,30}-coverage{45,50}
+ py{27,35,36,37,py,py3}-pytest46-xdist27-coverage{45,51}
+ py{36,37,38,py3}-pytest{46,54}-xdist32-coverage{45,51}
docs
[testenv]
@@ -14,31 +13,26 @@
PYTHONUNBUFFERED=yes
# Use env vars for (optional) pinning of deps.
- pytest310: _DEP_PYTEST=pytest==3.10.1
- pytest40: _DEP_PYTEST=pytest==4.0.2
- pytest41: _DEP_PYTEST=pytest==4.1.1
- pytest43: _DEP_PYTEST=pytest==4.3.1
- pytest44: _DEP_PYTEST=pytest==4.4.2
- pytest45: _DEP_PYTEST=pytest==4.5.0
- pytest46: _DEP_PYTEST=pytest==4.6.5
- pytest51: _DEP_PYTEST=pytest==5.1.3
- pytest52: _DEP_PYTEST=pytest==5.2.0
+ pytest46: _DEP_PYTEST=pytest==4.6.10
+ pytest53: _DEP_PYTEST=pytest==5.3.2
+ pytest54: _DEP_PYTEST=pytest==5.4.2
- xdist22: _DEP_PYTESTXDIST=pytest-xdist==1.22.0
xdist27: _DEP_PYTESTXDIST=pytest-xdist==1.27.0
- xdist28: _DEP_PYTESTXDIST=pytest-xdist==1.28.0
xdist29: _DEP_PYTESTXDIST=pytest-xdist==1.29.0
- xdist30: _DEP_PYTESTXDIST=pytest-xdist==1.30.0
+ xdist31: _DEP_PYTESTXDIST=pytest-xdist==1.31.0
+ xdist32: _DEP_PYTESTXDIST=pytest-xdist==1.32.0
coverage45: _DEP_COVERAGE=coverage==4.5.4
- coverage50: _DEP_COVERAGE=coverage==5.0a8
-
+ coverage50: _DEP_COVERAGE=coverage==5.0.4
+ coverage51: _DEP_COVERAGE=coverage==5.1
+ # For testing against a coverage.py working tree.
+ coveragedev: _DEP_COVERAGE=-e{env:COVERAGE_HOME}
passenv =
*
deps =
{env:_DEP_PYTEST:pytest}
{env:_DEP_PYTESTXDIST:pytest-xdist}
- {env:_DEP_COVERAGE:coverage<5}
+ {env:_DEP_COVERAGE:coverage}
pip_pre = true
commands =
pytest {posargs:-vv}