Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/rsyncdir deprecation #1

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2860709
Update changelog. Close #422.
ionelmc Aug 14, 2020
da61b91
Bump version: 2.10.0 → 2.10.1
ionelmc Aug 14, 2020
87d8b0c
Update config.rst wrt ignored .coveragerc settings
PamelaM Aug 28, 2020
aeefc96
Rewrite the whole paragraph and use a block to make it stand out more.
ionelmc Sep 5, 2020
9887c9f
Inherit coverage context in subprocesses
gaborbernat Nov 4, 2020
151bbe3
Do not install empty console_scripts entry point
mgorny Sep 21, 2020
7b9feca
Change example configs to support tox -e pyXX
gschaffner Sep 23, 2020
6592810
Update setup.py
MatTerra Sep 10, 2020
0eada98
Update skel; migrate to travis-ci.com.
ionelmc Jan 10, 2021
4ce7ac3
Update test deps.
ionelmc Jan 11, 2021
42d7705
Oops.
ionelmc Jan 11, 2021
25eed21
Turns out there were some internal changes in the pytester plugin.
ionelmc Jan 11, 2021
a2493d5
Skip this on 3.8+
ionelmc Jan 12, 2021
d3c382a
Skip this on 3.8+
ionelmc Jan 12, 2021
5f935d5
Update changelog.
ionelmc Jan 17, 2021
bd7e850
Fix link name.
ionelmc Jan 17, 2021
b45388d
Bump version: 2.10.1 → 2.11.0
ionelmc Jan 18, 2021
d39de1e
Fix custom commands with newer setuptools
mgorny Jan 18, 2021
51f1f2b
Update changelog.
ionelmc Jan 20, 2021
5e1913e
Bump version: 2.11.0 → 2.11.1
ionelmc Jan 20, 2021
c2dfa77
Update test deps. Remove unnecessary assertion. Closes #452.
ionelmc Mar 4, 2021
daf54e7
Added toml as extra (#410)
Cielquan Mar 24, 2021
2cd0094
change in setup.py from BSD to MIT to match LICENSE file (#467)
csreesan May 12, 2021
f5a4d7e
Fix version value. Fixes #468.
ionelmc May 13, 2021
f2ee249
fix link in readme (#470)
terencehonles May 14, 2021
62d2e94
Fix configuration file, ref f2ee249.
ionelmc May 14, 2021
f533121
Update changelog.
ionelmc May 14, 2021
9692bad
Bump version: 2.11.1 → 2.12.0
ionelmc May 14, 2021
297965e
Update appveyor envs. Workaround pypy install problem.
ionelmc May 14, 2021
0242835
Remove use of rsyncdir
ssbarnea Oct 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 27 additions & 6 deletions .appveyor.yml
@@ -1,15 +1,36 @@
# 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
- 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-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: '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*
Expand Down
12 changes: 8 additions & 4 deletions .bumpversion.cfg
@@ -1,15 +1,19 @@
[bumpversion]
current_version = 2.10.0
current_version = 2.12.0
commit = True
tag = True

[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'

[bumpversion:file:README.rst]
search = v{current_version}.
replace = v{new_version}.
[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}'
Expand Down
9 changes: 3 additions & 6 deletions .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: '-'
Expand All @@ -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
Expand All @@ -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'
6 changes: 5 additions & 1 deletion .editorconfig
Expand Up @@ -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

Expand All @@ -14,3 +15,6 @@ end_of_line = crlf

[*.{yml,yaml}]
indent_size = 2

[*.tsv]
indent_style = tab
5 changes: 4 additions & 1 deletion .gitignore
Expand Up @@ -39,11 +39,14 @@ htmlcov
# Translations
*.mo

# Mr Developer
# Buildout
.mr.developer.cfg

# IDE project files
.project
.pydevproject
.idea
.vscode
*.iml
*.komodoproject

Expand Down
66 changes: 20 additions & 46 deletions .travis.yml
Expand Up @@ -20,69 +20,43 @@ jobs:
- env: TOXENV=docs

- stage: tests
env: TOXENV=py27-pytest46-xdist27-coverage45
env: TOXENV=py27-pytest46-xdist127-coverage55
python: '2.7'
- env: TOXENV=py27-pytest46-xdist27-coverage52
python: '2.7'
- env: TOXENV=py35-pytest46-xdist27-coverage45
python: '3.5'
- env: TOXENV=py35-pytest46-xdist27-coverage52
- env: TOXENV=py35-pytest46-xdist127-coverage55
python: '3.5'
- env: TOXENV=py36-pytest46-xdist27-coverage45
- env: TOXENV=py36-pytest46-xdist127-coverage55
python: '3.6'
- env: TOXENV=py36-pytest46-xdist27-coverage52
python: '3.6'
- env: TOXENV=py37-pytest46-xdist27-coverage45
python: '3.7'
- env: TOXENV=py37-pytest46-xdist27-coverage52
- env: TOXENV=py37-pytest46-xdist127-coverage55
python: '3.7'
- env: TOXENV=pypy-pytest46-xdist27-coverage45
- env: TOXENV=pypy-pytest46-xdist127-coverage55
python: 'pypy'
- env: TOXENV=pypy-pytest46-xdist27-coverage52
python: 'pypy'
- env: TOXENV=pypy3-pytest46-xdist27-coverage45
python: 'pypy3'
- env: TOXENV=pypy3-pytest46-xdist27-coverage52
- env: TOXENV=pypy3-pytest46-xdist127-coverage55
python: 'pypy3'
- env: TOXENV=py36-pytest46-xdist33-coverage45
python: '3.6'
- env: TOXENV=py36-pytest46-xdist33-coverage52
- env: TOXENV=py36-pytest46-xdist133-coverage55
python: '3.6'
- env: TOXENV=py36-pytest54-xdist33-coverage45
- env: TOXENV=py36-pytest54-xdist133-coverage55
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
- env: TOXENV=py37-pytest46-xdist133-coverage55
python: '3.7'
- env: TOXENV=py37-pytest54-xdist33-coverage45
- env: TOXENV=py37-pytest54-xdist133-coverage55
python: '3.7'
- env: TOXENV=py37-pytest54-xdist33-coverage52
python: '3.7'
- env: TOXENV=py38-pytest46-xdist33-coverage45
python: '3.8'
- env: TOXENV=py38-pytest46-xdist33-coverage52
- env: TOXENV=py38-pytest46-xdist133-coverage55
python: '3.8'
- env: TOXENV=py38-pytest54-xdist33-coverage45
- env: TOXENV=py38-pytest54-xdist133-coverage55
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-coverage55
python: 'pypy3'
- env: TOXENV=pypy3-pytest54-xdist33-coverage52
- env: TOXENV=pypy3-pytest54-xdist133-coverage55
python: 'pypy3'
- env: TOXENV=py36-pytest60-xdist200-coverage52
- env: TOXENV=py36-pytest62-xdist202-coverage55
python: '3.6'
- env: TOXENV=py37-pytest60-xdist200-coverage52
- env: TOXENV=py37-pytest62-xdist202-coverage55
python: '3.7'
- env: TOXENV=py38-pytest60-xdist200-coverage52
- env: TOXENV=py38-pytest62-xdist202-coverage55
python: '3.8'
- env: TOXENV=pypy3-pytest60-xdist200-coverage52
- env: TOXENV=py39-pytest62-xdist202-coverage55
python: '3.9'
- env: TOXENV=pypy3-pytest62-xdist202-coverage55
python: 'pypy3'

- stage: examples
Expand Down
7 changes: 7 additions & 0 deletions AUTHORS.rst
Expand Up @@ -39,3 +39,10 @@ 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
* Christian Riedel - https://github.com/Cielquan
* Chris Sreesangkom - https://github.com/csreesan
42 changes: 41 additions & 1 deletion CHANGELOG.rst
@@ -1,11 +1,51 @@
Changelog
=========

2.10.1 (2020-06-??)

2.12.0 (2021-05-14)
-------------------

* Added coverage's `toml` extra to install requirements in setup.py.
Contributed by Christian Riedel in `#410 <https://github.com/pytest-dev/pytest-cov/pull/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 <https://github.com/pytest-dev/pytest-cov/pull/467>`_.
* Fixed *commits since* badge.
Contributed by Terence Honles in `#470 <https://github.com/pytest-dev/pytest-cov/pull/470>`_.

2.11.1 (2021-01-20)
-------------------

* Fixed support for newer setuptools (v42+).
Contributed by Michał Górny in `#451 <https://github.com/pytest-dev/pytest-cov/pull/451>`_.

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 `#433 <https://github.com/pytest-dev/pytest-cov/pull/433>`_.
* Improved sample projects (from the `examples <https://github.com/pytest-dev/pytest-cov/tree/master/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 <https://github.com/pytest-dev/pytest-cov/pull/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 <https://github.com/pytest-dev/pytest-cov/pull/434>`_.
* Fixed the missing `coverage context <https://coverage.readthedocs.io/en/stable/contexts.html>`_
when using subprocesses.
Contributed by Bernát Gábor in `#443 <https://github.com/pytest-dev/pytest-cov/pull/443>`_.
* Updated the config section in the docs.
Contributed by Pamela McA'Nulty in `#429 <https://github.com/pytest-dev/pytest-cov/pull/429>`_.
* Migrated CI to travis-ci.com (from .org).

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 <https://github.com/pytest-dev/pytest-cov/pull/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)
-------------------
Expand Down
5 changes: 3 additions & 2 deletions CONTRIBUTING.rst
Expand Up @@ -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 <https://travis-ci.org/pytest-dev/pytest-cov/pull_requests>`_ for each change you add in the pull request.
`run the tests <https://travis-ci.com//github/pytest-dev/pytest-cov/pull_requests>`_
for each change you add in the pull request.

It will be slower though ...

Expand All @@ -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
8 changes: 4 additions & 4 deletions README.rst
Expand Up @@ -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
Expand All @@ -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.12.0.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.12.0...master

.. |wheel| image:: https://img.shields.io/pypi/wheel/pytest-cov.svg
:alt: PyPI Wheel
Expand Down
23 changes: 22 additions & 1 deletion ci/templates/.appveyor.yml
@@ -1,14 +1,35 @@
version: '{branch}-{build}'
build: off
image:
- Visual Studio 2015
- Visual Studio 2019
environment:
matrix:
- TOXENV: check
- TOXENV: '{{ py27_environments|join(",") }}'
- 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*
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -26,7 +26,7 @@
year = '2016'
author = 'pytest-cov contributors'
copyright = '{}, {}'.format(year, author)
version = release = '2.10.0'
version = release = '2.12.0'

pygments_style = 'trac'
templates_path = ['.']
Expand Down
13 changes: 10 additions & 3 deletions docs/config.rst
Expand Up @@ -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

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).
.. 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: ::
Expand Down