From 2860709d1765ab3107ba77539d336c81039c7f5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Fri, 14 Aug 2020 19:11:28 +0300 Subject: [PATCH 01/30] Update changelog. Close #422. --- CHANGELOG.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 52c35136..33666452 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,11 +1,13 @@ Changelog ========= -2.10.1 (2020-06-??) +2.10.1 (2020-08-14) ------------------- * Support for ``pytest-xdist`` 2.0, which breaks compatibility with ``pytest-xdist`` before 1.22.3 (from 2017). Contributed by Zac Hatfield-Dodds in `#412 `_. +* Fixed the ``LocalPath has no attribute startswith`` failure that occurred when using the ``pytester`` plugin + in inline mode. 2.10.0 (2020-06-12) ------------------- From da61b912c48fadf6df71c8cd4712a23dbdc2efc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Fri, 14 Aug 2020 19:11:40 +0300 Subject: [PATCH 02/30] =?UTF-8?q?Bump=20version:=202.10.0=20=E2=86=92=202.?= =?UTF-8?q?10.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 3 ++- README.rst | 4 ++-- docs/conf.py | 2 +- setup.py | 2 +- src/pytest_cov/__init__.py | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 30a7014b..fc1162d4 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.10.0 +current_version = 2.10.1 commit = True tag = True @@ -18,3 +18,4 @@ replace = version = release = '{new_version}' [bumpversion:file:src/pytest_cov/__init__.py] search = __version__ = '{current_version}' replace = __version__ = '{new_version}' + diff --git a/README.rst b/README.rst index 3b6ed2a1..2b1284df 100644 --- a/README.rst +++ b/README.rst @@ -38,9 +38,9 @@ Overview .. |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.10.0.svg +.. |commits-since| image:: https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.10.1.svg :alt: Commits since latest release - :target: https://github.com/pytest-dev/pytest-cov/compare/v2.10.0...master + :target: https://github.com/pytest-dev/pytest-cov/compare/v2.10.1...master .. |wheel| image:: https://img.shields.io/pypi/wheel/pytest-cov.svg :alt: PyPI Wheel diff --git a/docs/conf.py b/docs/conf.py index ce62c430..353927d8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ year = '2016' author = 'pytest-cov contributors' copyright = '{}, {}'.format(year, author) -version = release = '2.10.0' +version = release = '2.10.1' pygments_style = 'trac' templates_path = ['.'] diff --git a/setup.py b/setup.py index e0dd574c..6796670e 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def run(self): setup( name='pytest-cov', - version='2.10.0', + version='2.10.1', 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'))), diff --git a/src/pytest_cov/__init__.py b/src/pytest_cov/__init__.py index 00253580..61668cab 100644 --- a/src/pytest_cov/__init__.py +++ b/src/pytest_cov/__init__.py @@ -1,2 +1,2 @@ """pytest-cov: avoid already-imported warning: PYTEST_DONT_REWRITE.""" -__version__ = "2.10.0" +__version__ = "__version__ = '2.10.1'" From 87d8b0ce96b84cc1ab8fb709df7c1535a9a0d68a Mon Sep 17 00:00:00 2001 From: Pamela McA'Nulty Date: Fri, 28 Aug 2020 13:07:28 -0400 Subject: [PATCH 03/30] Update config.rst wrt ignored .coveragerc settings I took a while to figure out why coverage wasn't working correctly for our large project until yesterday, when I read the paragraph that called out the `.coveragerc` options that `pytest-cov` ignores. This PR makes that part of the documentation "pop" a bit more. I considered moving it under "Caveats", but decided that that would mean rewriting "Caveats" to have two separate issues, rather than the one that it currently explains. --- docs/config.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/config.rst b/docs/config.rst index 3e5bf938..597e0d1b 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -21,9 +21,9 @@ For full details refer to the `coverage config file`_ documentation. .. _`coverage config file`: https://coverage.readthedocs.io/en/latest/config.html -Note that this plugin controls some options and setting the option in the config file will have no -effect. These include specifying source to be measured (source option) and all data file handling -(data_file and parallel options). +**Important Note :** This plugin controls some options and setting the option in the config file will have no +effect. These include specifying source to be measured ("source" option) and all data file handling +("data_file" and "parallel" options). If you wish to always add pytest-cov with pytest, you can use ``addopts`` under ``pytest`` or ``tool:pytest`` section. For example: :: From aeefc964a71beca1ec36731bc46208cc4c1b5ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sat, 5 Sep 2020 22:14:48 +0300 Subject: [PATCH 04/30] Rewrite the whole paragraph and use a block to make it stand out more. --- docs/config.rst | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/config.rst b/docs/config.rst index 597e0d1b..0dfb17a0 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -21,9 +21,16 @@ For full details refer to the `coverage config file`_ documentation. .. _`coverage config file`: https://coverage.readthedocs.io/en/latest/config.html -**Important Note :** This plugin controls some options and setting the option in the config file will have no -effect. These include specifying source to be measured ("source" option) and all data file handling -("data_file" and "parallel" options). +.. note:: Important Note + + This plugin overrides the ``data_file`` and ``parallel`` options of coverage. Unless you also run coverage without + pytest-cov it's pointless to set those options in your ``.coveragerc``. + + If you use the ``--cov=something`` option (with a value) then coverage's ``source`` option will also get overriden. + If you have multiple sources it might be easier to set those in ``.coveragerc`` and always use ``--cov`` (wihout a value) + instead of having a long command line with ``--cov=pkg1 --cov=pkg2 --cov=pkg3 ...``. + + If you use the ``--cov-branch`` option then coverage's ``branch`` option will also get overriden. If you wish to always add pytest-cov with pytest, you can use ``addopts`` under ``pytest`` or ``tool:pytest`` section. For example: :: From 9887c9f57e9ee66dfddaacac73fbd85c713886b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Wed, 4 Nov 2020 09:10:51 +0000 Subject: [PATCH 05/30] Inherit coverage context in subprocesses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bernát Gábor --- src/pytest_cov/embed.py | 3 +++ src/pytest_cov/engine.py | 1 + src/pytest_cov/plugin.py | 1 + 3 files changed, 5 insertions(+) diff --git a/src/pytest_cov/embed.py b/src/pytest_cov/embed.py index 7e081fee..3adecdba 100644 --- a/src/pytest_cov/embed.py +++ b/src/pytest_cov/embed.py @@ -45,6 +45,7 @@ def init(): cov_config = os.environ.get('COV_CORE_CONFIG') cov_datafile = os.environ.get('COV_CORE_DATAFILE') cov_branch = True if os.environ.get('COV_CORE_BRANCH') == 'enabled' else None + cov_context = os.environ.get('COV_CORE_CONTEXT') if cov_datafile: if _active_cov: @@ -71,6 +72,8 @@ def init(): ) cov.load() cov.start() + if cov_context: + cov.switch_context(cov_context) cov._warn_no_data = False cov._warn_unimported_source = False return cov diff --git a/src/pytest_cov/engine.py b/src/pytest_cov/engine.py index eab06564..084e92ea 100644 --- a/src/pytest_cov/engine.py +++ b/src/pytest_cov/engine.py @@ -110,6 +110,7 @@ def unset_env(): os.environ.pop('COV_CORE_CONFIG', None) os.environ.pop('COV_CORE_DATAFILE', None) os.environ.pop('COV_CORE_BRANCH', None) + os.environ.pop('COV_CORE_CONTEXT', None) @staticmethod def get_node_desc(platform, version_info): diff --git a/src/pytest_cov/plugin.py b/src/pytest_cov/plugin.py index 2d22b309..b875f409 100644 --- a/src/pytest_cov/plugin.py +++ b/src/pytest_cov/plugin.py @@ -356,6 +356,7 @@ def pytest_runtest_call(self, item): def switch_context(self, item, when): context = "{item.nodeid}|{when}".format(item=item, when=when) self.cov.switch_context(context) + os.environ['COV_CORE_CONTEXT'] = context @pytest.fixture From 151bbe35ca9fc2de3ca48a24668c2569cb8c56e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 21 Sep 2020 18:03:53 +0200 Subject: [PATCH 06/30] Do not install empty console_scripts entry point The empty 'console_scripts' entry point serves no purpose, and it is rather unlikely for it to contain any script in the near future. Its presence confuses Gentoo missing dependency checks. --- setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup.py b/setup.py index 6796670e..af0c67b5 100755 --- a/setup.py +++ b/setup.py @@ -141,8 +141,6 @@ def run(self): 'pytest11': [ 'pytest_cov = pytest_cov.plugin', ], - 'console_scripts': [ - ] }, cmdclass={ 'build': BuildWithPTH, From 7b9feca62967b44309d2413c1afbe4a26e0f5fad Mon Sep 17 00:00:00 2001 From: Ganden Schaffner Date: Tue, 22 Sep 2020 23:20:40 -0700 Subject: [PATCH 07/30] Change example configs to support tox -e pyXX --- examples/adhoc-layout/tox.ini | 13 +++++-------- examples/src-layout/tox.ini | 13 +++++-------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/examples/adhoc-layout/tox.ini b/examples/adhoc-layout/tox.ini index a2472d03..6e299f24 100644 --- a/examples/adhoc-layout/tox.ini +++ b/examples/adhoc-layout/tox.ini @@ -1,12 +1,14 @@ [tox] -envlist = clean,py27,py38,report +envlist = py27,py38,report [tool:pytest] addopts = --cov-report=term-missing [testenv] -commands = pytest --cov --cov-append --cov-config={toxinidir}/.coveragerc {posargs:-vv} +setenv = + py{27,38}: COVERAGE_FILE = .coverage.{envname} +commands = pytest --cov --cov-config={toxinidir}/.coveragerc {posargs:-vv} deps = pytest coverage @@ -17,7 +19,6 @@ deps = ../.. depends = - {py27,py38}: clean report: py27,py38 # note that this is necessary to prevent the tests importing the code from your badly laid project @@ -27,10 +28,6 @@ changedir = tests skip_install = true deps = coverage commands = + coverage combine coverage html coverage report --fail-under=100 - -[testenv:clean] -skip_install = true -deps = coverage -commands = coverage erase diff --git a/examples/src-layout/tox.ini b/examples/src-layout/tox.ini index 054b4b80..6be8e73d 100644 --- a/examples/src-layout/tox.ini +++ b/examples/src-layout/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = clean,py27,py38,report +envlist = py27,py38,report [tool:pytest] testpaths = tests @@ -7,7 +7,9 @@ addopts = --cov-report=term-missing [testenv] -commands = pytest --cov --cov-append {posargs:-vv} +setenv = + py{27,38}: COVERAGE_FILE = .coverage.{envname} +commands = pytest --cov {posargs:-vv} deps = pytest coverage @@ -18,17 +20,12 @@ deps = ../.. depends = - {py27,py38}: clean report: py27,py38 [testenv:report] skip_install = true deps = coverage commands = + coverage combine coverage html coverage report --fail-under=100 - -[testenv:clean] -skip_install = true -deps = coverage -commands = coverage erase From 6592810f4181091fbd284e013b5ed91c08e3a479 Mon Sep 17 00:00:00 2001 From: Mateus Berardo de Souza Terra Date: Thu, 10 Sep 2020 11:57:20 -0300 Subject: [PATCH 08/30] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index af0c67b5..8c6306c9 100755 --- a/setup.py +++ b/setup.py @@ -124,7 +124,7 @@ def run(self): ], install_requires=[ 'pytest>=4.6', - 'coverage>=4.4' + 'coverage>=5.2.1' ], python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', extras_require={ From 0eada98182c7e4754927d5eefdd5e1ae72a9062d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sun, 10 Jan 2021 22:54:35 +0200 Subject: [PATCH 09/30] Update skel; migrate to travis-ci.com. --- .bumpversion.cfg | 5 ++--- .cookiecutterrc | 9 +++------ .editorconfig | 6 +++++- .gitignore | 5 ++++- CONTRIBUTING.rst | 5 +++-- README.rst | 4 ++-- tox.ini | 10 ++++++++++ 7 files changed, 29 insertions(+), 15 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index fc1162d4..4999a65f 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -8,8 +8,8 @@ search = version='{current_version}' replace = version='{new_version}' [bumpversion:file:README.rst] -search = v{current_version}. -replace = v{new_version}. +search = /v{current_version}.svg +replace = /v{new_version}.svg [bumpversion:file:docs/conf.py] search = version = release = '{current_version}' @@ -18,4 +18,3 @@ replace = version = release = '{new_version}' [bumpversion:file:src/pytest_cov/__init__.py] search = __version__ = '{current_version}' replace = __version__ = '{new_version}' - diff --git a/.cookiecutterrc b/.cookiecutterrc index c477a6f5..9cad1178 100644 --- a/.cookiecutterrc +++ b/.cookiecutterrc @@ -1,9 +1,6 @@ # Generated by cookiepatcher, a small shim around cookiecutter (pip install cookiepatcher) -cookiecutter: - _extensions: - - jinja2_time.TimeExtension - _template: /home/ionel/open-source/cookiecutter-pylibrary +default_context: allow_tests_inside_package: no appveyor: yes c_extension_function: '-' @@ -23,7 +20,7 @@ cookiecutter: distribution_name: pytest-cov email: contact@ionelmc.ro full_name: Ionel Cristian Mărieș - landscape: no + legacy_python: yes license: MIT license linter: flake8 package_name: pytest_cov @@ -50,7 +47,7 @@ cookiecutter: test_runner: pytest travis: yes travis_osx: no - version: 2.10.0 + version: 2.10.1 website: http://blog.ionelmc.ro year_from: '2010' year_to: '2020' diff --git a/.editorconfig b/.editorconfig index a9c7977a..586c7367 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,10 +2,11 @@ root = true [*] +# Use Unix-style newlines for most files (except Windows files, see below). end_of_line = lf trim_trailing_whitespace = true -insert_final_newline = true indent_style = space +insert_final_newline = true indent_size = 4 charset = utf-8 @@ -14,3 +15,6 @@ end_of_line = crlf [*.{yml,yaml}] indent_size = 2 + +[*.tsv] +indent_style = tab diff --git a/.gitignore b/.gitignore index dfe58380..83a43fdb 100644 --- a/.gitignore +++ b/.gitignore @@ -39,11 +39,14 @@ htmlcov # Translations *.mo -# Mr Developer +# Buildout .mr.developer.cfg + +# IDE project files .project .pydevproject .idea +.vscode *.iml *.komodoproject diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 53f55975..f02562eb 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -74,7 +74,8 @@ For merging, you should: 4. Add yourself to ``AUTHORS.rst``. .. [1] If you don't have all the necessary python versions available locally you can rely on Travis - it will - `run the tests `_ for each change you add in the pull request. + `run the tests `_ + for each change you add in the pull request. It will be slower though ... @@ -85,6 +86,6 @@ To run a subset of tests:: tox -e envname -- pytest -k test_myfeature -To run the test environments in *parallel*:: +To run all the test environments in *parallel*:: tox -p auto diff --git a/README.rst b/README.rst index 2b1284df..45a23371 100644 --- a/README.rst +++ b/README.rst @@ -19,9 +19,9 @@ Overview :target: https://readthedocs.org/projects/pytest-cov :alt: Documentation Status -.. |travis| image:: https://api.travis-ci.org/pytest-dev/pytest-cov.svg?branch=master +.. |travis| image:: https://api.travis-ci.com/pytest-dev/pytest-cov.svg?branch=master :alt: Travis-CI Build Status - :target: https://travis-ci.org/pytest-dev/pytest-cov + :target: https://travis-ci.com/github/pytest-dev/pytest-cov .. |appveyor| image:: https://ci.appveyor.com/api/projects/status/github/pytest-dev/pytest-cov?branch=master&svg=true :alt: AppVeyor Build Status diff --git a/tox.ini b/tox.ini index ec088198..b59b70ec 100644 --- a/tox.ini +++ b/tox.ini @@ -1,3 +1,13 @@ +[testenv:bootstrap] +deps = + jinja2 + matrix + tox +skip_install = true +commands = + python ci/bootstrap.py --no-env +passenv = + * ; a generative tox configuration, see: https://tox.readthedocs.io/en/latest/config.html#generative-envlist [tox] From 4ce7ac3cb463e7a42b1f10da45aba3c5987d23de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Mon, 11 Jan 2021 14:32:32 +0200 Subject: [PATCH 10/30] Update test deps. --- .appveyor.yml | 10 ++++---- .travis.yml | 66 ++++++++++++++++++++------------------------------- tox.ini | 23 +++++++++++------- 3 files changed, 45 insertions(+), 54 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index b5c6654e..8c776417 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -4,11 +4,11 @@ build: off environment: matrix: - TOXENV: check - - TOXENV: 'py27-pytest46-xdist27-coverage45,py27-pytest46-xdist27-coverage52' - - TOXENV: 'py35-pytest46-xdist27-coverage45,py35-pytest46-xdist27-coverage52' - - TOXENV: 'py36-pytest46-xdist27-coverage45,py36-pytest46-xdist27-coverage52,py36-pytest46-xdist33-coverage45,py36-pytest46-xdist33-coverage52,py36-pytest54-xdist33-coverage45,py36-pytest54-xdist33-coverage52,py36-pytest60-xdist200-coverage52' - - TOXENV: 'py37-pytest46-xdist27-coverage45,py37-pytest46-xdist27-coverage52,py37-pytest46-xdist33-coverage45,py37-pytest46-xdist33-coverage52,py37-pytest54-xdist33-coverage45,py37-pytest54-xdist33-coverage52,py37-pytest60-xdist200-coverage52' - - TOXENV: 'pypy-pytest46-xdist27-coverage45,pypy-pytest46-xdist27-coverage52' + - TOXENV: 'py27-pytest46-xdist127-coverage52,py27-pytest46-xdist127-coverage53' + - TOXENV: 'py35-pytest46-xdist127-coverage52,py35-pytest46-xdist127-coverage53' + - TOXENV: 'py36-pytest46-xdist127-coverage52,py36-pytest46-xdist127-coverage53,py36-pytest46-xdist133-coverage53,py36-pytest54-xdist133-coverage53,py36-pytest62-xdist202-coverage53' + - TOXENV: 'py37-pytest46-xdist127-coverage52,py37-pytest46-xdist127-coverage53,py37-pytest46-xdist133-coverage53,py37-pytest54-xdist133-coverage53,py37-pytest62-xdist202-coverage53' + - TOXENV: 'pypy-pytest46-xdist127-coverage52,pypy-pytest46-xdist127-coverage53' init: - ps: echo $env:TOXENV diff --git a/.travis.yml b/.travis.yml index 3c96aad9..db6e815a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,69 +20,55 @@ jobs: - env: TOXENV=docs - stage: tests - env: TOXENV=py27-pytest46-xdist27-coverage45 + env: TOXENV=py27-pytest46-xdist127-coverage52 python: '2.7' - - env: TOXENV=py27-pytest46-xdist27-coverage52 + - env: TOXENV=py27-pytest46-xdist127-coverage53 python: '2.7' - - env: TOXENV=py35-pytest46-xdist27-coverage45 + - env: TOXENV=py35-pytest46-xdist127-coverage52 python: '3.5' - - env: TOXENV=py35-pytest46-xdist27-coverage52 + - env: TOXENV=py35-pytest46-xdist127-coverage53 python: '3.5' - - env: TOXENV=py36-pytest46-xdist27-coverage45 + - env: TOXENV=py36-pytest46-xdist127-coverage52 python: '3.6' - - env: TOXENV=py36-pytest46-xdist27-coverage52 + - env: TOXENV=py36-pytest46-xdist127-coverage53 python: '3.6' - - env: TOXENV=py37-pytest46-xdist27-coverage45 + - env: TOXENV=py37-pytest46-xdist127-coverage52 python: '3.7' - - env: TOXENV=py37-pytest46-xdist27-coverage52 + - env: TOXENV=py37-pytest46-xdist127-coverage53 python: '3.7' - - env: TOXENV=pypy-pytest46-xdist27-coverage45 + - env: TOXENV=pypy-pytest46-xdist127-coverage52 python: 'pypy' - - env: TOXENV=pypy-pytest46-xdist27-coverage52 + - env: TOXENV=pypy-pytest46-xdist127-coverage53 python: 'pypy' - - env: TOXENV=pypy3-pytest46-xdist27-coverage45 + - env: TOXENV=pypy3-pytest46-xdist127-coverage52 python: 'pypy3' - - env: TOXENV=pypy3-pytest46-xdist27-coverage52 + - env: TOXENV=pypy3-pytest46-xdist127-coverage53 python: 'pypy3' - - env: TOXENV=py36-pytest46-xdist33-coverage45 + - env: TOXENV=py36-pytest46-xdist133-coverage53 python: '3.6' - - env: TOXENV=py36-pytest46-xdist33-coverage52 + - env: TOXENV=py36-pytest54-xdist133-coverage53 python: '3.6' - - env: TOXENV=py36-pytest54-xdist33-coverage45 - python: '3.6' - - env: TOXENV=py36-pytest54-xdist33-coverage52 - python: '3.6' - - env: TOXENV=py37-pytest46-xdist33-coverage45 - python: '3.7' - - env: TOXENV=py37-pytest46-xdist33-coverage52 - python: '3.7' - - env: TOXENV=py37-pytest54-xdist33-coverage45 + - env: TOXENV=py37-pytest46-xdist133-coverage53 python: '3.7' - - env: TOXENV=py37-pytest54-xdist33-coverage52 + - env: TOXENV=py37-pytest54-xdist133-coverage53 python: '3.7' - - env: TOXENV=py38-pytest46-xdist33-coverage45 + - env: TOXENV=py38-pytest46-xdist133-coverage53 python: '3.8' - - env: TOXENV=py38-pytest46-xdist33-coverage52 + - env: TOXENV=py38-pytest54-xdist133-coverage53 python: '3.8' - - env: TOXENV=py38-pytest54-xdist33-coverage45 - python: '3.8' - - env: TOXENV=py38-pytest54-xdist33-coverage52 - python: '3.8' - - env: TOXENV=pypy3-pytest46-xdist33-coverage45 - python: 'pypy3' - - env: TOXENV=pypy3-pytest46-xdist33-coverage52 - python: 'pypy3' - - env: TOXENV=pypy3-pytest54-xdist33-coverage45 + - env: TOXENV=pypy3-pytest46-xdist133-coverage53 python: 'pypy3' - - env: TOXENV=pypy3-pytest54-xdist33-coverage52 + - env: TOXENV=pypy3-pytest54-xdist133-coverage53 python: 'pypy3' - - env: TOXENV=py36-pytest60-xdist200-coverage52 + - env: TOXENV=py36-pytest62-xdist202-coverage53 python: '3.6' - - env: TOXENV=py37-pytest60-xdist200-coverage52 + - env: TOXENV=py37-pytest62-xdist202-coverage53 python: '3.7' - - env: TOXENV=py38-pytest60-xdist200-coverage52 + - env: TOXENV=py38-pytest62-xdist202-coverage53 python: '3.8' - - env: TOXENV=pypy3-pytest60-xdist200-coverage52 + - env: TOXENV=py39-pytest62-xdist202-coverage53 + python: '3.9' + - env: TOXENV=pypy3-pytest62-xdist202-coverage53 python: 'pypy3' - stage: examples diff --git a/tox.ini b/tox.ini index b59b70ec..fb2a5dfb 100644 --- a/tox.ini +++ b/tox.ini @@ -13,9 +13,9 @@ passenv = [tox] envlist = check - py{27,35,36,37,py,py3}-pytest46-xdist27-coverage{45,52} - py{36,37,38,py3}-pytest{46,54}-xdist33-coverage{45,52} - py{36,37,38,py3}-pytest{60}-xdist200-coverage{52} + py{27,35,36,37,py,py3}-pytest46-xdist127-coverage{52,53} + py{36,37,38,py3}-pytest{46,54}-xdist133-coverage{53} + py{36,37,38,39,py3}-pytest{62}-xdist202-coverage{53} docs [testenv] @@ -27,21 +27,26 @@ setenv = pytest46: _DEP_PYTEST=pytest==4.6.10 pytest53: _DEP_PYTEST=pytest==5.3.2 pytest54: _DEP_PYTEST=pytest==5.4.3 - pytest60: _DEP_PYTEST=pytest==6.0.1 + pytest60: _DEP_PYTEST=pytest==6.0.2 + pytest61: _DEP_PYTEST=pytest==6.1.2 + pytest62: _DEP_PYTEST=pytest==6.2.1 xdist27: _DEP_PYTESTXDIST=pytest-xdist==1.27.0 - xdist29: _DEP_PYTESTXDIST=pytest-xdist==1.29.0 - xdist31: _DEP_PYTESTXDIST=pytest-xdist==1.31.0 - xdist32: _DEP_PYTESTXDIST=pytest-xdist==1.32.0 - xdist33: _DEP_PYTESTXDIST=pytest-xdist==1.33.0 - xdist34: _DEP_PYTESTXDIST=pytest-xdist==1.34.0 + xdist129: _DEP_PYTESTXDIST=pytest-xdist==1.29.0 + xdist131: _DEP_PYTESTXDIST=pytest-xdist==1.31.0 + xdist132: _DEP_PYTESTXDIST=pytest-xdist==1.32.0 + xdist133: _DEP_PYTESTXDIST=pytest-xdist==1.33.0 + xdist134: _DEP_PYTESTXDIST=pytest-xdist==1.34.0 xdist200: _DEP_PYTESTXDIST=pytest-xdist==2.0.0 + xdist201: _DEP_PYTESTXDIST=pytest-xdist==2.1.0 + xdist202: _DEP_PYTESTXDIST=pytest-xdist==2.2.0 xdistdev: _DEP_PYTESTXDIST=git+https://github.com/pytest-dev/pytest-xdist.git#egg=pytest-xdist coverage45: _DEP_COVERAGE=coverage==4.5.4 coverage50: _DEP_COVERAGE=coverage==5.0.4 coverage51: _DEP_COVERAGE=coverage==5.1 coverage52: _DEP_COVERAGE=coverage==5.2.1 + coverage53: _DEP_COVERAGE=coverage==5.3.1 # For testing against a coverage.py working tree. coveragedev: _DEP_COVERAGE=-e{env:COVERAGE_HOME} passenv = From 42d7705b26c3fdbd74cd81a01b8fe0f213d16095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Mon, 11 Jan 2021 14:42:53 +0200 Subject: [PATCH 11/30] Oops. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index fb2a5dfb..279db82e 100644 --- a/tox.ini +++ b/tox.ini @@ -31,7 +31,7 @@ setenv = pytest61: _DEP_PYTEST=pytest==6.1.2 pytest62: _DEP_PYTEST=pytest==6.2.1 - xdist27: _DEP_PYTESTXDIST=pytest-xdist==1.27.0 + xdist127: _DEP_PYTESTXDIST=pytest-xdist==1.27.0 xdist129: _DEP_PYTESTXDIST=pytest-xdist==1.29.0 xdist131: _DEP_PYTESTXDIST=pytest-xdist==1.31.0 xdist132: _DEP_PYTESTXDIST=pytest-xdist==1.32.0 From 25eed212085ce9a2d5383a6a4a2b360d0d514f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Mon, 11 Jan 2021 15:49:18 +0200 Subject: [PATCH 12/30] Turns out there were some internal changes in the pytester plugin. --- tests/test_pytest_cov.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/test_pytest_cov.py b/tests/test_pytest_cov.py index f0fd6caa..c6511aad 100644 --- a/tests/test_pytest_cov.py +++ b/tests/test_pytest_cov.py @@ -1538,8 +1538,14 @@ def test_cover_looponfail(testdir, monkeypatch): testdir.makeconftest(CONFTEST) script = testdir.makepyfile(BASIC_TEST) - monkeypatch.setattr(testdir, 'run', - lambda *args, **kwargs: _TestProcess(*map(str, args))) + def mock_run(*args, **kwargs): + return _TestProcess(*map(str, args)) + + monkeypatch.setattr(testdir, 'run', mock_run) + assert testdir.run is mock_run + if hasattr(testdir, '_pytester'): + monkeypatch.setattr(testdir._pytester, 'run', mock_run) + assert testdir._pytester.run is mock_run with testdir.runpytest('-v', '--cov=%s' % script.dirpath(), '--looponfail', From a2493d5f1825568b1f66ff033a49f28437560cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Tue, 12 Jan 2021 15:08:11 +0200 Subject: [PATCH 13/30] Skip this on 3.8+ --- tests/test_pytest_cov.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_pytest_cov.py b/tests/test_pytest_cov.py index c6511aad..fd3d180d 100644 --- a/tests/test_pytest_cov.py +++ b/tests/test_pytest_cov.py @@ -1059,7 +1059,7 @@ def test_funcarg_not_active(testdir): @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") -@pytest.mark.skipif('sys.version_info[:2] == (3, 8)', reason="deadlocks on Python 3.8, see: https://bugs.python.org/issue38227") +@pytest.mark.skipif('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') From d3c382a7e7e933e9602f5a5445d03f6dc5138da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Tue, 12 Jan 2021 15:58:03 +0200 Subject: [PATCH 14/30] Skip this on 3.8+ --- tests/test_pytest_cov.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_pytest_cov.py b/tests/test_pytest_cov.py index fd3d180d..3c730504 100644 --- a/tests/test_pytest_cov.py +++ b/tests/test_pytest_cov.py @@ -1100,7 +1100,7 @@ def test_run_target(): @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") -@pytest.mark.skipif('sys.version_info[:2] == (3, 8)', reason="deadlocks on Python 3.8, see: https://bugs.python.org/issue38227") +@pytest.mark.skipif('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') From 5f935d5dc281b470687147b28f90b09dc887efc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Mon, 18 Jan 2021 00:57:29 +0200 Subject: [PATCH 15/30] Update changelog. --- AUTHORS.rst | 5 +++++ CHANGELOG.rst | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index a7688685..30d5907b 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -39,3 +39,8 @@ Authors * Michael Manganiello - https://github.com/adamantike * Anders Hovmöller - https://github.com/boxed * Zac Hatfield-Dodds - https://zhd.dev +* Mateus Berardo de Souza Terra - https://github.com/MatTerra +* Ganden Schaffner - https://github.com/gschaffner +* Michał Górny - https://github.com/mgorny +* Bernát Gábor - https://github.com/gaborbernat +* Pamela McA'Nulty - https://github.com/PamelaM diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 33666452..84c5e169 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,25 @@ Changelog ========= +2.11.0 (2021-01-18) +------------------- + +* Bumped minimum coverage requirement to 5.2.1. This prevents reporting issues. + Contributed by Mateus Berardo de Souza Terra in `#443 `_. +* Improved sample projects (from the `examples `_ + directory) to support running `tox -e pyXY`. Now the example configures a suffixed coverage data file, + and that makes the cleanup environment unnecessary. + Contributed by Ganden Schaffner in `#435 `_. +* Removed the empty `console_scripts` entrypoint that confused some Gentoo build script. + I didn't ask why it was so broken cause I didn't want to ruin my day. + Contributed by Michał Górny in `#434 `_. +* Fixed the missing `coverage context `_ + when using subprocesses. + Contributed by Bernát Gábor in `#443 `_. +* Updated the config section in the docs. + Contributed by Pamela McA'Nulty in `#429 `_. +* Migrated CI to travis-ci.com (from .org). + 2.10.1 (2020-08-14) ------------------- From bd7e8506d7c0d85ac10f3569b8da3584b80bc67c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Mon, 18 Jan 2021 01:02:22 +0200 Subject: [PATCH 16/30] Fix link name. --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 84c5e169..63612943 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,7 +5,7 @@ Changelog ------------------- * Bumped minimum coverage requirement to 5.2.1. This prevents reporting issues. - Contributed by Mateus Berardo de Souza Terra in `#443 `_. + Contributed by Mateus Berardo de Souza Terra in `#433 `_. * Improved sample projects (from the `examples `_ directory) to support running `tox -e pyXY`. Now the example configures a suffixed coverage data file, and that makes the cleanup environment unnecessary. From b45388d0bf81465759412c6b977c6a1fc5201346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Mon, 18 Jan 2021 09:32:19 +0200 Subject: [PATCH 17/30] =?UTF-8?q?Bump=20version:=202.10.1=20=E2=86=92=202.?= =?UTF-8?q?11.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 3 ++- README.rst | 2 +- docs/conf.py | 2 +- setup.py | 2 +- src/pytest_cov/__init__.py | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 4999a65f..62ff83fe 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.10.1 +current_version = 2.11.0 commit = True tag = True @@ -18,3 +18,4 @@ replace = version = release = '{new_version}' [bumpversion:file:src/pytest_cov/__init__.py] search = __version__ = '{current_version}' replace = __version__ = '{new_version}' + diff --git a/README.rst b/README.rst index 45a23371..1d9bd1fc 100644 --- a/README.rst +++ b/README.rst @@ -38,7 +38,7 @@ Overview .. |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.10.1.svg +.. |commits-since| image:: https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.11.0.svg :alt: Commits since latest release :target: https://github.com/pytest-dev/pytest-cov/compare/v2.10.1...master diff --git a/docs/conf.py b/docs/conf.py index 353927d8..edfb6d1f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ year = '2016' author = 'pytest-cov contributors' copyright = '{}, {}'.format(year, author) -version = release = '2.10.1' +version = release = '2.11.0' pygments_style = 'trac' templates_path = ['.'] diff --git a/setup.py b/setup.py index 8c6306c9..74139eea 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def run(self): setup( name='pytest-cov', - version='2.10.1', + version='2.11.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'))), diff --git a/src/pytest_cov/__init__.py b/src/pytest_cov/__init__.py index 61668cab..375f45de 100644 --- a/src/pytest_cov/__init__.py +++ b/src/pytest_cov/__init__.py @@ -1,2 +1,2 @@ """pytest-cov: avoid already-imported warning: PYTEST_DONT_REWRITE.""" -__version__ = "__version__ = '2.10.1'" +__version__ = "__version__ = '2.11.0'" From d39de1eea7a2d8451fa14cd45298caeead3bf2cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 18 Jan 2021 09:25:10 +0100 Subject: [PATCH 18/30] Fix custom commands with newer setuptools Fix custom commands to handle additional arguments to the run() method. This is needed with newer versions of setuptools since they've started passing 'show_deprecation' kwarg in easy_install command, and this resulted in the following error: ``` Traceback (most recent call last): File "/tmp/pytest-cov/./setup.py", line 86, in setup( File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.9/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib/python3.9/site-packages/setuptools/command/install.py", line 67, in run self.do_egg_install() File "/usr/lib/python3.9/site-packages/setuptools/command/install.py", line 117, in do_egg_install cmd.run(show_deprecation=False) TypeError: run() got an unexpected keyword argument 'show_deprecation' ``` While at it, future-proof all overriden commands to accept pass any arguments through. --- setup.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 74139eea..f12cbc04 100755 --- a/setup.py +++ b/setup.py @@ -30,24 +30,24 @@ def read(*names, **kwargs): class BuildWithPTH(build): - def run(self): - build.run(self) + def run(self, *args, **kwargs): + build.run(self, *args, **kwargs) path = join(dirname(__file__), 'src', 'pytest-cov.pth') dest = join(self.build_lib, basename(path)) self.copy_file(path, dest) class EasyInstallWithPTH(easy_install): - def run(self): - easy_install.run(self) + def run(self, *args, **kwargs): + easy_install.run(self, *args, **kwargs) path = join(dirname(__file__), 'src', 'pytest-cov.pth') dest = join(self.install_dir, basename(path)) self.copy_file(path, dest) class InstallLibWithPTH(install_lib): - def run(self): - install_lib.run(self) + def run(self, *args, **kwargs): + install_lib.run(self, *args, **kwargs) path = join(dirname(__file__), 'src', 'pytest-cov.pth') dest = join(self.install_dir, basename(path)) self.copy_file(path, dest) @@ -58,8 +58,8 @@ def get_outputs(self): class DevelopWithPTH(develop): - def run(self): - develop.run(self) + def run(self, *args, **kwargs): + develop.run(self, *args, **kwargs) path = join(dirname(__file__), 'src', 'pytest-cov.pth') dest = join(self.install_dir, basename(path)) self.copy_file(path, dest) From 51f1f2b353ef388a00810f28f8682f891d699332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Wed, 20 Jan 2021 12:45:37 +0200 Subject: [PATCH 19/30] Update changelog. --- CHANGELOG.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 63612943..cc865bfe 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,12 @@ Changelog ========= +2.11.1 (2021-01-20) +------------------- + +* Fixed support for newer setuptools (v42+). + Contributed by Michał Górny in `#451 `_. + 2.11.0 (2021-01-18) ------------------- From 5e1913e013eb06d5bd1357695349d0a75fbf0503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Wed, 20 Jan 2021 12:45:57 +0200 Subject: [PATCH 20/30] =?UTF-8?q?Bump=20version:=202.11.0=20=E2=86=92=202.?= =?UTF-8?q?11.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- README.rst | 2 +- docs/conf.py | 2 +- setup.py | 2 +- src/pytest_cov/__init__.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 62ff83fe..95330435 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.11.0 +current_version = 2.11.1 commit = True tag = True diff --git a/README.rst b/README.rst index 1d9bd1fc..6fd04ad7 100644 --- a/README.rst +++ b/README.rst @@ -38,7 +38,7 @@ Overview .. |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.11.0.svg +.. |commits-since| image:: https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.11.1.svg :alt: Commits since latest release :target: https://github.com/pytest-dev/pytest-cov/compare/v2.10.1...master diff --git a/docs/conf.py b/docs/conf.py index edfb6d1f..c774b421 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ year = '2016' author = 'pytest-cov contributors' copyright = '{}, {}'.format(year, author) -version = release = '2.11.0' +version = release = '2.11.1' pygments_style = 'trac' templates_path = ['.'] diff --git a/setup.py b/setup.py index f12cbc04..7abccf58 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def run(self): setup( name='pytest-cov', - version='2.11.0', + version='2.11.1', 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'))), diff --git a/src/pytest_cov/__init__.py b/src/pytest_cov/__init__.py index 375f45de..12142c14 100644 --- a/src/pytest_cov/__init__.py +++ b/src/pytest_cov/__init__.py @@ -1,2 +1,2 @@ """pytest-cov: avoid already-imported warning: PYTEST_DONT_REWRITE.""" -__version__ = "__version__ = '2.11.0'" +__version__ = "__version__ = '2.11.1'" From c2dfa778a85c1f64f3f59007b8d8ca98c877cac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Thu, 4 Mar 2021 14:09:21 +0200 Subject: [PATCH 21/30] Update test deps. Remove unnecessary assertion. Closes #452. --- .appveyor.yml | 10 ++++---- .travis.yml | 50 +++++++++++++++------------------------- tests/test_pytest_cov.py | 11 --------- tox.ini | 10 ++++---- 4 files changed, 30 insertions(+), 51 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 8c776417..fde3a6aa 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -4,11 +4,11 @@ build: off environment: matrix: - TOXENV: check - - TOXENV: 'py27-pytest46-xdist127-coverage52,py27-pytest46-xdist127-coverage53' - - TOXENV: 'py35-pytest46-xdist127-coverage52,py35-pytest46-xdist127-coverage53' - - TOXENV: 'py36-pytest46-xdist127-coverage52,py36-pytest46-xdist127-coverage53,py36-pytest46-xdist133-coverage53,py36-pytest54-xdist133-coverage53,py36-pytest62-xdist202-coverage53' - - TOXENV: 'py37-pytest46-xdist127-coverage52,py37-pytest46-xdist127-coverage53,py37-pytest46-xdist133-coverage53,py37-pytest54-xdist133-coverage53,py37-pytest62-xdist202-coverage53' - - TOXENV: 'pypy-pytest46-xdist127-coverage52,pypy-pytest46-xdist127-coverage53' + - TOXENV: 'py27-pytest46-xdist127-coverage55' + - TOXENV: 'py35-pytest46-xdist127-coverage55' + - TOXENV: 'py36-pytest46-xdist127-coverage55,py36-pytest46-xdist133-coverage55,py36-pytest54-xdist133-coverage55,py36-pytest62-xdist202-coverage55' + - TOXENV: 'py37-pytest46-xdist127-coverage55,py37-pytest46-xdist133-coverage55,py37-pytest54-xdist133-coverage55,py37-pytest62-xdist202-coverage55' + - TOXENV: 'pypy-pytest46-xdist127-coverage55' init: - ps: echo $env:TOXENV diff --git a/.travis.yml b/.travis.yml index db6e815a..a9cafa4e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,55 +20,43 @@ jobs: - env: TOXENV=docs - stage: tests - env: TOXENV=py27-pytest46-xdist127-coverage52 + env: TOXENV=py27-pytest46-xdist127-coverage55 python: '2.7' - - env: TOXENV=py27-pytest46-xdist127-coverage53 - python: '2.7' - - env: TOXENV=py35-pytest46-xdist127-coverage52 - python: '3.5' - - env: TOXENV=py35-pytest46-xdist127-coverage53 + - env: TOXENV=py35-pytest46-xdist127-coverage55 python: '3.5' - - env: TOXENV=py36-pytest46-xdist127-coverage52 - python: '3.6' - - env: TOXENV=py36-pytest46-xdist127-coverage53 + - env: TOXENV=py36-pytest46-xdist127-coverage55 python: '3.6' - - env: TOXENV=py37-pytest46-xdist127-coverage52 + - env: TOXENV=py37-pytest46-xdist127-coverage55 python: '3.7' - - env: TOXENV=py37-pytest46-xdist127-coverage53 - python: '3.7' - - env: TOXENV=pypy-pytest46-xdist127-coverage52 - python: 'pypy' - - env: TOXENV=pypy-pytest46-xdist127-coverage53 + - env: TOXENV=pypy-pytest46-xdist127-coverage55 python: 'pypy' - - env: TOXENV=pypy3-pytest46-xdist127-coverage52 - python: 'pypy3' - - env: TOXENV=pypy3-pytest46-xdist127-coverage53 + - env: TOXENV=pypy3-pytest46-xdist127-coverage55 python: 'pypy3' - - env: TOXENV=py36-pytest46-xdist133-coverage53 + - env: TOXENV=py36-pytest46-xdist133-coverage55 python: '3.6' - - env: TOXENV=py36-pytest54-xdist133-coverage53 + - env: TOXENV=py36-pytest54-xdist133-coverage55 python: '3.6' - - env: TOXENV=py37-pytest46-xdist133-coverage53 + - env: TOXENV=py37-pytest46-xdist133-coverage55 python: '3.7' - - env: TOXENV=py37-pytest54-xdist133-coverage53 + - env: TOXENV=py37-pytest54-xdist133-coverage55 python: '3.7' - - env: TOXENV=py38-pytest46-xdist133-coverage53 + - env: TOXENV=py38-pytest46-xdist133-coverage55 python: '3.8' - - env: TOXENV=py38-pytest54-xdist133-coverage53 + - env: TOXENV=py38-pytest54-xdist133-coverage55 python: '3.8' - - env: TOXENV=pypy3-pytest46-xdist133-coverage53 + - env: TOXENV=pypy3-pytest46-xdist133-coverage55 python: 'pypy3' - - env: TOXENV=pypy3-pytest54-xdist133-coverage53 + - env: TOXENV=pypy3-pytest54-xdist133-coverage55 python: 'pypy3' - - env: TOXENV=py36-pytest62-xdist202-coverage53 + - env: TOXENV=py36-pytest62-xdist202-coverage55 python: '3.6' - - env: TOXENV=py37-pytest62-xdist202-coverage53 + - env: TOXENV=py37-pytest62-xdist202-coverage55 python: '3.7' - - env: TOXENV=py38-pytest62-xdist202-coverage53 + - env: TOXENV=py38-pytest62-xdist202-coverage55 python: '3.8' - - env: TOXENV=py39-pytest62-xdist202-coverage53 + - env: TOXENV=py39-pytest62-xdist202-coverage55 python: '3.9' - - env: TOXENV=pypy3-pytest62-xdist202-coverage53 + - env: TOXENV=pypy3-pytest62-xdist202-coverage55 python: 'pypy3' - stage: examples diff --git a/tests/test_pytest_cov.py b/tests/test_pytest_cov.py index 3c730504..0d1b5a23 100644 --- a/tests/test_pytest_cov.py +++ b/tests/test_pytest_cov.py @@ -498,10 +498,6 @@ def test_central_coveragerc(testdir, prop): 'test_central_coveragerc* %s *' % prop.result, '*10 passed*', ]) - - # single-module coverage report - assert all(not line.startswith('TOTAL ') for line in result.stdout.lines[-4:]) - assert result.ret == 0 @@ -536,10 +532,6 @@ def test_central_with_path_aliasing(testdir, monkeypatch, opts, prop): 'src[\\/]mod* %s *' % prop.result, '*10 passed*', ]) - - # single-module coverage report - assert all(not line.startswith('TOTAL ') for line in result.stdout.lines[-4:]) - assert result.ret == 0 @@ -642,9 +634,6 @@ def test_show_missing_coveragerc(testdir, prop): '*10 passed*', ]) - # single-module coverage report - assert all(not line.startswith('TOTAL ') for line in result.stdout.lines[-4:]) - assert result.ret == 0 diff --git a/tox.ini b/tox.ini index 279db82e..6be986e9 100644 --- a/tox.ini +++ b/tox.ini @@ -13,9 +13,9 @@ passenv = [tox] envlist = check - py{27,35,36,37,py,py3}-pytest46-xdist127-coverage{52,53} - py{36,37,38,py3}-pytest{46,54}-xdist133-coverage{53} - py{36,37,38,39,py3}-pytest{62}-xdist202-coverage{53} + py{27,35,36,37,py,py3}-pytest46-xdist127-coverage{55} + py{36,37,38,py3}-pytest{46,54}-xdist133-coverage{55} + py{36,37,38,39,py3}-pytest{62}-xdist202-coverage{55} docs [testenv] @@ -29,7 +29,7 @@ setenv = pytest54: _DEP_PYTEST=pytest==5.4.3 pytest60: _DEP_PYTEST=pytest==6.0.2 pytest61: _DEP_PYTEST=pytest==6.1.2 - pytest62: _DEP_PYTEST=pytest==6.2.1 + pytest62: _DEP_PYTEST=pytest==6.2.2 xdist127: _DEP_PYTESTXDIST=pytest-xdist==1.27.0 xdist129: _DEP_PYTESTXDIST=pytest-xdist==1.29.0 @@ -47,6 +47,8 @@ setenv = coverage51: _DEP_COVERAGE=coverage==5.1 coverage52: _DEP_COVERAGE=coverage==5.2.1 coverage53: _DEP_COVERAGE=coverage==5.3.1 + coverage54: _DEP_COVERAGE=coverage==5.4 + coverage55: _DEP_COVERAGE=coverage==5.5 # For testing against a coverage.py working tree. coveragedev: _DEP_COVERAGE=-e{env:COVERAGE_HOME} passenv = From daf54e79fcb8f549699d28e691302a9251f7e54b Mon Sep 17 00:00:00 2001 From: Christian Riedel Date: Wed, 24 Mar 2021 12:07:33 +0100 Subject: [PATCH 22/30] Added toml as extra (#410) * added toml extra * Update AUTHORS.rst * Update CHANGELOG.rst * chain toml dependency to coverage's toml dependency Co-authored-by: Thomas Grainger * move coverage's toml dependency from extras to install_requires * udpate changelog phrase Co-authored-by: Thomas Grainger --- AUTHORS.rst | 1 + CHANGELOG.rst | 7 +++++++ setup.py | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 30d5907b..8c715b1e 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -44,3 +44,4 @@ Authors * Michał Górny - https://github.com/mgorny * Bernát Gábor - https://github.com/gaborbernat * Pamela McA'Nulty - https://github.com/PamelaM +* Christian Riedel - https://github.com/Cielquan diff --git a/CHANGELOG.rst b/CHANGELOG.rst index cc865bfe..904fa0d8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,13 @@ Changelog ========= + +2.12.0 (2021-03-??) +------------------- + +* Added coverage's `toml` extra to install requirements in setup.py. + Contributed by Christian Riedel in `#410 `_. + 2.11.1 (2021-01-20) ------------------- diff --git a/setup.py b/setup.py index 7abccf58..a00ae0af 100755 --- a/setup.py +++ b/setup.py @@ -124,7 +124,7 @@ def run(self): ], install_requires=[ 'pytest>=4.6', - 'coverage>=5.2.1' + 'coverage[toml]>=5.2.1' ], python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', extras_require={ From 2cd009442ddb08dc873117019b13ef972803d5c4 Mon Sep 17 00:00:00 2001 From: Chris Sreesangkom Date: Wed, 12 May 2021 10:04:47 -0700 Subject: [PATCH 23/30] change in setup.py from BSD to MIT to match LICENSE file (#467) --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a00ae0af..ba885db1 100755 --- a/setup.py +++ b/setup.py @@ -102,7 +102,7 @@ def run(self): 'Development Status :: 5 - Production/Stable', 'Framework :: Pytest', 'Intended Audience :: Developers', - 'License :: OSI Approved :: BSD License', + 'License :: OSI Approved :: MIT License', 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX', 'Operating System :: Unix', From f5a4d7e008087913ce2bc9dc2305d05a5f545a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Thu, 13 May 2021 16:05:31 +0300 Subject: [PATCH 24/30] Fix version value. Fixes #468. --- src/pytest_cov/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pytest_cov/__init__.py b/src/pytest_cov/__init__.py index 12142c14..00b8d837 100644 --- a/src/pytest_cov/__init__.py +++ b/src/pytest_cov/__init__.py @@ -1,2 +1,2 @@ """pytest-cov: avoid already-imported warning: PYTEST_DONT_REWRITE.""" -__version__ = "__version__ = '2.11.1'" +__version__ = '2.11.1' From f2ee249e7214b9cad53f56fe33b6c8012a8ef08e Mon Sep 17 00:00:00 2001 From: Terence Honles Date: Fri, 14 May 2021 02:03:29 -0700 Subject: [PATCH 25/30] fix link in readme (#470) --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 6fd04ad7..63d18f7b 100644 --- a/README.rst +++ b/README.rst @@ -40,7 +40,7 @@ Overview .. |commits-since| image:: https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.11.1.svg :alt: Commits since latest release - :target: https://github.com/pytest-dev/pytest-cov/compare/v2.10.1...master + :target: https://github.com/pytest-dev/pytest-cov/compare/v2.11.1...master .. |wheel| image:: https://img.shields.io/pypi/wheel/pytest-cov.svg :alt: PyPI Wheel From 62d2e94debe6230e0160b1d5f711ae7f42158e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Fri, 14 May 2021 13:22:12 +0300 Subject: [PATCH 26/30] Fix configuration file, ref f2ee249. --- .bumpversion.cfg | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 95330435..cea38d79 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -7,10 +7,14 @@ tag = True search = version='{current_version}' replace = version='{new_version}' -[bumpversion:file:README.rst] +[bumpversion:file (badge):README.rst] search = /v{current_version}.svg replace = /v{new_version}.svg +[bumpversion:file (link):README.rst] +search = /v{current_version}...master +replace = /v{new_version}...master + [bumpversion:file:docs/conf.py] search = version = release = '{current_version}' replace = version = release = '{new_version}' From f533121b78d479ee4bf0c3c09b48d9513523ffb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Fri, 14 May 2021 13:29:57 +0300 Subject: [PATCH 27/30] Update changelog. --- AUTHORS.rst | 1 + CHANGELOG.rst | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 8c715b1e..d3d01d11 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -45,3 +45,4 @@ Authors * Bernát Gábor - https://github.com/gaborbernat * Pamela McA'Nulty - https://github.com/PamelaM * Christian Riedel - https://github.com/Cielquan +* Chris Sreesangkom - https://github.com/csreesan diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 904fa0d8..23e9a3b9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,11 +2,17 @@ Changelog ========= -2.12.0 (2021-03-??) +2.12.0 (2021-05-14) ------------------- * Added coverage's `toml` extra to install requirements in setup.py. Contributed by Christian Riedel in `#410 `_. +* Fixed ``pytest_cov.__version__`` to have the right value (string with version instead of a string + including ``__version__ =``). +* Fixed license classifier in ``setup.py``. + Contributed by Chris Sreesangkom in `#467 `_. +* Fixed *commits since* badge. + Contributed by Terence Honles in `#470 `_. 2.11.1 (2021-01-20) ------------------- From 9692bad8c3501b77cf950d0732ae9cb5c8bb0bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Fri, 14 May 2021 14:32:34 +0300 Subject: [PATCH 28/30] =?UTF-8?q?Bump=20version:=202.11.1=20=E2=86=92=202.?= =?UTF-8?q?12.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 3 +-- README.rst | 4 ++-- docs/conf.py | 2 +- setup.py | 2 +- src/pytest_cov/__init__.py | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index cea38d79..7e15ff94 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.11.1 +current_version = 2.12.0 commit = True tag = True @@ -22,4 +22,3 @@ replace = version = release = '{new_version}' [bumpversion:file:src/pytest_cov/__init__.py] search = __version__ = '{current_version}' replace = __version__ = '{new_version}' - diff --git a/README.rst b/README.rst index 63d18f7b..a0c44a71 100644 --- a/README.rst +++ b/README.rst @@ -38,9 +38,9 @@ Overview .. |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.11.1.svg +.. |commits-since| image:: https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.12.0.svg :alt: Commits since latest release - :target: https://github.com/pytest-dev/pytest-cov/compare/v2.11.1...master + :target: https://github.com/pytest-dev/pytest-cov/compare/v2.12.0...master .. |wheel| image:: https://img.shields.io/pypi/wheel/pytest-cov.svg :alt: PyPI Wheel diff --git a/docs/conf.py b/docs/conf.py index c774b421..1da75b8a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ year = '2016' author = 'pytest-cov contributors' copyright = '{}, {}'.format(year, author) -version = release = '2.11.1' +version = release = '2.12.0' pygments_style = 'trac' templates_path = ['.'] diff --git a/setup.py b/setup.py index ba885db1..ca77760c 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def run(self): setup( name='pytest-cov', - version='2.11.1', + version='2.12.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'))), diff --git a/src/pytest_cov/__init__.py b/src/pytest_cov/__init__.py index 00b8d837..a9f1cb62 100644 --- a/src/pytest_cov/__init__.py +++ b/src/pytest_cov/__init__.py @@ -1,2 +1,2 @@ """pytest-cov: avoid already-imported warning: PYTEST_DONT_REWRITE.""" -__version__ = '2.11.1' +__version__ = '2.12.0' From 297965e05a7712e50c2f8a4dc26cd189132aba22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Fri, 14 May 2021 14:37:02 +0300 Subject: [PATCH 29/30] Update appveyor envs. Workaround pypy install problem. --- .appveyor.yml | 23 ++++++++++++++++++++++- ci/templates/.appveyor.yml | 23 ++++++++++++++++++++++- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index fde3a6aa..6ee159e9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,6 +1,9 @@ # NOTE: this file is auto-generated via ci/bootstrap.py (ci/templates/.appveyor.yml). version: '{branch}-{build}' build: off +image: + - Visual Studio 2015 + - Visual Studio 2019 environment: matrix: - TOXENV: check @@ -8,8 +11,26 @@ environment: - TOXENV: 'py35-pytest46-xdist127-coverage55' - TOXENV: 'py36-pytest46-xdist127-coverage55,py36-pytest46-xdist133-coverage55,py36-pytest54-xdist133-coverage55,py36-pytest62-xdist202-coverage55' - TOXENV: 'py37-pytest46-xdist127-coverage55,py37-pytest46-xdist133-coverage55,py37-pytest54-xdist133-coverage55,py37-pytest62-xdist202-coverage55' + - TOXENV: 'py38-pytest46-xdist133-coverage55,py38-pytest54-xdist133-coverage55,py38-pytest62-xdist202-coverage55' + - TOXENV: 'py39-pytest62-xdist202-coverage55' - TOXENV: 'pypy-pytest46-xdist127-coverage55' - + - TOXENV: 'pypy3-pytest46-xdist127-coverage55,pypy3-pytest46-xdist133-coverage55,pypy3-pytest54-xdist133-coverage55,pypy3-pytest62-xdist202-coverage55' +matrix: + exclude: + - image: Visual Studio 2015 + TOXENV: 'py27-pytest46-xdist127-coverage55' + - image: Visual Studio 2019 + TOXENV: 'py36-pytest46-xdist127-coverage55,py36-pytest46-xdist133-coverage55,py36-pytest54-xdist133-coverage55,py36-pytest62-xdist202-coverage55' + - image: Visual Studio 2019 + TOXENV: 'py37-pytest46-xdist127-coverage55,py37-pytest46-xdist133-coverage55,py37-pytest54-xdist133-coverage55,py37-pytest62-xdist202-coverage55' + - image: Visual Studio 2019 + TOXENV: 'py38-pytest46-xdist133-coverage55,py38-pytest54-xdist133-coverage55,py38-pytest62-xdist202-coverage55' + - image: Visual Studio 2019 + TOXENV: 'py39-pytest62-xdist202-coverage55' + - image: Visual Studio 2019 + TOXENV: 'pypy-pytest46-xdist127-coverage55' + - image: Visual Studio 2019 + TOXENV: 'pypy3-pytest46-xdist127-coverage55,pypy3-pytest46-xdist133-coverage55,pypy3-pytest54-xdist133-coverage55,pypy3-pytest62-xdist202-coverage55' init: - ps: echo $env:TOXENV - ps: ls C:\Python* diff --git a/ci/templates/.appveyor.yml b/ci/templates/.appveyor.yml index 92630e15..01ca3493 100644 --- a/ci/templates/.appveyor.yml +++ b/ci/templates/.appveyor.yml @@ -1,5 +1,8 @@ version: '{branch}-{build}' build: off +image: + - Visual Studio 2015 + - Visual Studio 2019 environment: matrix: - TOXENV: check @@ -7,8 +10,26 @@ environment: - TOXENV: '{{ py35_environments|join(",") }}' - TOXENV: '{{ py36_environments|join(",") }}' - TOXENV: '{{ py37_environments|join(",") }}' + - TOXENV: '{{ py38_environments|join(",") }}' + - TOXENV: '{{ py39_environments|join(",") }}' - TOXENV: '{{ pypy_environments|join(",") }}' - + - TOXENV: '{{ pypy3_environments|join(",") }}' +matrix: + exclude: + - image: Visual Studio 2015 + TOXENV: '{{ py27_environments|join(",") }}' + - image: Visual Studio 2019 + TOXENV: '{{ py36_environments|join(",") }}' + - image: Visual Studio 2019 + TOXENV: '{{ py37_environments|join(",") }}' + - image: Visual Studio 2019 + TOXENV: '{{ py38_environments|join(",") }}' + - image: Visual Studio 2019 + TOXENV: '{{ py39_environments|join(",") }}' + - image: Visual Studio 2019 + TOXENV: '{{ pypy_environments|join(",") }}' + - image: Visual Studio 2019 + TOXENV: '{{ pypy3_environments|join(",") }}' init: - ps: echo $env:TOXENV - ps: ls C:\Python* From 024283523f63aa9666e9d952a9616d29062f6dd6 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Wed, 26 Oct 2022 18:46:42 +0100 Subject: [PATCH 30/30] Remove use of rsyncdir Fixes: #557 --- docs/xdist.rst | 2 +- src/pytest_cov/engine.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/xdist.rst b/docs/xdist.rst index a2da50e9..5f7bc882 100644 --- a/docs/xdist.rst +++ b/docs/xdist.rst @@ -30,7 +30,7 @@ Again but spread over different hosts and different directories:: pytest --cov=myproj --dist load --tx ssh=memedough@host1//chdir=testenv1 --tx ssh=memedough@host2//chdir=/tmp/testenv2//python=/tmp/env1/bin/python - --rsyncdir myproj --rsyncdir tests --rsync examples + --rsync examples tests/ Shows a terminal report:: diff --git a/src/pytest_cov/engine.py b/src/pytest_cov/engine.py index 084e92ea..ac66c6ff 100644 --- a/src/pytest_cov/engine.py +++ b/src/pytest_cov/engine.py @@ -248,7 +248,9 @@ def start(self): # Ensure coverage rc file rsynced if appropriate. if self.cov_config and os.path.exists(self.cov_config): - self.config.option.rsyncdir.append(self.cov_config) + # rsyncdir is going away in pytest-xdist 4.0, already deprecated + if hasattr(self.config.option, 'rsyncdir'): + self.config.option.rsyncdir.append(self.cov_config) self.cov = coverage.Coverage(source=self.cov_source, branch=self.cov_branch,