Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pytest-dev/pytest-cov
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9540437
Choose a base ref
...
head repository: pytest-dev/pytest-cov
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 10f8cde
Choose a head ref

Commits on Nov 24, 2024

  1. Update CHANGELOG.rst to highlight when python 3.7 and 3.6 where dropped

    mikemanger authored Nov 24, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8916e6e View commit details

Commits on Nov 25, 2024

  1. Merge pull request #668 from mikemanger/patch-1

    webknjaz authored Nov 25, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4732d50 View commit details

Commits on Mar 20, 2025

  1. fix failing link

    tsvikas committed Mar 20, 2025
    Copy the full SHA
    b02c9a0 View commit details
  2. Configure Sphinx to ignore GitHub comment anchors

    Add linkcheck_anchors_ignore setting to skip GitHub's dynamic comment
    anchors during documentation link validation. This prevents false
    positives in CI when checking links to GitHub issue comments, as GitHub
    injects these anchors dynamically in the web interface.
    tsvikas committed Mar 20, 2025
    Copy the full SHA
    2da9bb7 View commit details
  3. ignore anchors for github

    tsvikas authored Mar 20, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    72af9ef View commit details

Commits on Mar 23, 2025

  1. add ^ to regex

    Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
    tsvikas and webknjaz authored Mar 23, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    cc7eca2 View commit details
  2. Merge pull request #680 from tsvikas/fix-doc-links

    fix failing tests related to broken links
    webknjaz authored Mar 23, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    84b660c View commit details

Commits on Mar 24, 2025

  1. switch line to _

    tsvikas authored and ionelmc committed Mar 24, 2025
    Copy the full SHA
    1e54540 View commit details
  2. add heading to coverage reports

    tsvikas authored and ionelmc committed Mar 24, 2025
    Copy the full SHA
    102fdc7 View commit details
  3. use TerminalReporter for first heading

    tsvikas authored and ionelmc committed Mar 24, 2025
    Copy the full SHA
    a131cf2 View commit details
  4. use correct width

    tsvikas authored and ionelmc committed Mar 24, 2025
    Copy the full SHA
    43fda5e View commit details
  5. fix tests for _

    tsvikas authored and ionelmc committed Mar 24, 2025
    Copy the full SHA
    82d5ea0 View commit details
  6. move heading to pytest_terminal_summary

    tsvikas authored and ionelmc committed Mar 24, 2025
    Copy the full SHA
    22c4ae5 View commit details
  7. Copy the full SHA
    034faf2 View commit details
  8. made wrote_headings private

    tsvikas authored and ionelmc committed Mar 24, 2025
    Copy the full SHA
    2a1fed6 View commit details
  9. move section between functions

    tsvikas authored and ionelmc committed Mar 24, 2025
    Copy the full SHA
    362a359 View commit details
  10. add reference to code source

    tsvikas authored and ionelmc committed Mar 24, 2025
    Copy the full SHA
    2de0c6c View commit details
  11. Copy the full SHA
    ab2cd26 View commit details
  12. Upgrade ruff.

    ionelmc committed Mar 24, 2025
    Copy the full SHA
    089e7bb View commit details
  13. Update changelog.

    ionelmc committed Mar 24, 2025
    Copy the full SHA
    204af14 View commit details

Commits on Apr 1, 2025

  1. Remove unnecessary CovFailUnderWarning. Closes #675.

    ionelmc committed Apr 1, 2025
    Copy the full SHA
    44540e1 View commit details
  2. Copy the full SHA
    e760099 View commit details
  3. Refactor a bit the internals to be a bit less boilerplatey and have m…

    …ore clarity. The config/nodeid were never meant to be optional for this internal class - the intention there was to signal that they can be None values.
    ionelmc committed Apr 1, 2025
    Copy the full SHA
    aa57aed View commit details
  4. Update changelog.

    ionelmc committed Apr 1, 2025
    Copy the full SHA
    10b14af View commit details
  5. Bump version: 6.0.0 → 6.1.0

    ionelmc committed Apr 1, 2025
    Copy the full SHA
    10f8cde View commit details
Showing with 223 additions and 130 deletions.
  1. +1 −1 .bumpversion.cfg
  2. +1 −1 .cookiecutterrc
  3. +54 −36 .github/workflows/test.yml
  4. +2 −2 .pre-commit-config.yaml
  5. +2 −1 AUTHORS.rst
  6. +11 −0 CHANGELOG.rst
  7. +2 −2 README.rst
  8. +5 −1 docs/conf.py
  9. +2 −2 setup.py
  10. +1 −7 src/pytest_cov/__init__.py
  11. +45 −16 src/pytest_cov/engine.py
  12. +20 −19 src/pytest_cov/plugin.py
  13. +72 −39 tests/test_pytest_cov.py
  14. +5 −3 tox.ini
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 6.0.0
current_version = 6.1.0
commit = True
tag = True

2 changes: 1 addition & 1 deletion .cookiecutterrc
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ default_context:
sphinx_doctest: 'no'
sphinx_theme: sphinx-py3doc-enhanced-theme
test_matrix_separate_coverage: 'no'
version: 6.0.0
version: 6.1.0
version_manager: bump2version
website: http://blog.ionelmc.ro
year_from: '2010'
90 changes: 54 additions & 36 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -60,113 +60,131 @@ jobs:
toxpython: 'python3.11'
tox_env: 'docs'
os: 'ubuntu-latest'
- name: 'py39-pytest83-xdist36-coverage76 (ubuntu)'
- name: 'py39-pytest83-xdist36-coverage77 (ubuntu)'
python: '3.9'
toxpython: 'python3.9'
python_arch: 'x64'
tox_env: 'py39-pytest83-xdist36-coverage76'
tox_env: 'py39-pytest83-xdist36-coverage77'
os: 'ubuntu-latest'
- name: 'py39-pytest83-xdist36-coverage76 (windows)'
- name: 'py39-pytest83-xdist36-coverage77 (windows)'
python: '3.9'
toxpython: 'python3.9'
python_arch: 'x64'
tox_env: 'py39-pytest83-xdist36-coverage76'
tox_env: 'py39-pytest83-xdist36-coverage77'
os: 'windows-latest'
- name: 'py39-pytest83-xdist36-coverage76 (macos)'
- name: 'py39-pytest83-xdist36-coverage77 (macos)'
python: '3.9'
toxpython: 'python3.9'
python_arch: 'arm64'
tox_env: 'py39-pytest83-xdist36-coverage76'
tox_env: 'py39-pytest83-xdist36-coverage77'
os: 'macos-latest'
- name: 'py310-pytest83-xdist36-coverage76 (ubuntu)'
- name: 'py310-pytest83-xdist36-coverage77 (ubuntu)'
python: '3.10'
toxpython: 'python3.10'
python_arch: 'x64'
tox_env: 'py310-pytest83-xdist36-coverage76'
tox_env: 'py310-pytest83-xdist36-coverage77'
os: 'ubuntu-latest'
- name: 'py310-pytest83-xdist36-coverage76 (windows)'
- name: 'py310-pytest83-xdist36-coverage77 (windows)'
python: '3.10'
toxpython: 'python3.10'
python_arch: 'x64'
tox_env: 'py310-pytest83-xdist36-coverage76'
tox_env: 'py310-pytest83-xdist36-coverage77'
os: 'windows-latest'
- name: 'py310-pytest83-xdist36-coverage76 (macos)'
- name: 'py310-pytest83-xdist36-coverage77 (macos)'
python: '3.10'
toxpython: 'python3.10'
python_arch: 'arm64'
tox_env: 'py310-pytest83-xdist36-coverage76'
tox_env: 'py310-pytest83-xdist36-coverage77'
os: 'macos-latest'
- name: 'py311-pytest83-xdist36-coverage76 (ubuntu)'
- name: 'py311-pytest83-xdist36-coverage77 (ubuntu)'
python: '3.11'
toxpython: 'python3.11'
python_arch: 'x64'
tox_env: 'py311-pytest83-xdist36-coverage76'
tox_env: 'py311-pytest83-xdist36-coverage77'
os: 'ubuntu-latest'
- name: 'py311-pytest83-xdist36-coverage76 (windows)'
- name: 'py311-pytest83-xdist36-coverage77 (windows)'
python: '3.11'
toxpython: 'python3.11'
python_arch: 'x64'
tox_env: 'py311-pytest83-xdist36-coverage76'
tox_env: 'py311-pytest83-xdist36-coverage77'
os: 'windows-latest'
- name: 'py311-pytest83-xdist36-coverage76 (macos)'
- name: 'py311-pytest83-xdist36-coverage77 (macos)'
python: '3.11'
toxpython: 'python3.11'
python_arch: 'arm64'
tox_env: 'py311-pytest83-xdist36-coverage76'
tox_env: 'py311-pytest83-xdist36-coverage77'
os: 'macos-latest'
- name: 'py312-pytest83-xdist36-coverage76 (ubuntu)'
- name: 'py312-pytest83-xdist36-coverage77 (ubuntu)'
python: '3.12'
toxpython: 'python3.12'
python_arch: 'x64'
tox_env: 'py312-pytest83-xdist36-coverage76'
tox_env: 'py312-pytest83-xdist36-coverage77'
os: 'ubuntu-latest'
- name: 'py312-pytest83-xdist36-coverage76 (windows)'
- name: 'py312-pytest83-xdist36-coverage77 (windows)'
python: '3.12'
toxpython: 'python3.12'
python_arch: 'x64'
tox_env: 'py312-pytest83-xdist36-coverage76'
tox_env: 'py312-pytest83-xdist36-coverage77'
os: 'windows-latest'
- name: 'py312-pytest83-xdist36-coverage76 (macos)'
- name: 'py312-pytest83-xdist36-coverage77 (macos)'
python: '3.12'
toxpython: 'python3.12'
python_arch: 'arm64'
tox_env: 'py312-pytest83-xdist36-coverage76'
tox_env: 'py312-pytest83-xdist36-coverage77'
os: 'macos-latest'
- name: 'pypy39-pytest83-xdist36-coverage76 (ubuntu)'
- name: 'py313-pytest83-xdist36-coverage77 (ubuntu)'
python: '3.13'
toxpython: 'python3.13'
python_arch: 'x64'
tox_env: 'py313-pytest83-xdist36-coverage77'
os: 'ubuntu-latest'
- name: 'py313-pytest83-xdist36-coverage77 (windows)'
python: '3.13'
toxpython: 'python3.13'
python_arch: 'x64'
tox_env: 'py313-pytest83-xdist36-coverage77'
os: 'windows-latest'
- name: 'py313-pytest83-xdist36-coverage77 (macos)'
python: '3.13'
toxpython: 'python3.13'
python_arch: 'arm64'
tox_env: 'py313-pytest83-xdist36-coverage77'
os: 'macos-latest'
- name: 'pypy39-pytest83-xdist36-coverage77 (ubuntu)'
python: 'pypy-3.9'
toxpython: 'pypy3.9'
python_arch: 'x64'
tox_env: 'pypy39-pytest83-xdist36-coverage76'
tox_env: 'pypy39-pytest83-xdist36-coverage77'
os: 'ubuntu-latest'
- name: 'pypy39-pytest83-xdist36-coverage76 (windows)'
- name: 'pypy39-pytest83-xdist36-coverage77 (windows)'
python: 'pypy-3.9'
toxpython: 'pypy3.9'
python_arch: 'x64'
tox_env: 'pypy39-pytest83-xdist36-coverage76'
tox_env: 'pypy39-pytest83-xdist36-coverage77'
os: 'windows-latest'
- name: 'pypy39-pytest83-xdist36-coverage76 (macos)'
- name: 'pypy39-pytest83-xdist36-coverage77 (macos)'
python: 'pypy-3.9'
toxpython: 'pypy3.9'
python_arch: 'arm64'
tox_env: 'pypy39-pytest83-xdist36-coverage76'
tox_env: 'pypy39-pytest83-xdist36-coverage77'
os: 'macos-latest'
- name: 'pypy310-pytest83-xdist36-coverage76 (ubuntu)'
- name: 'pypy310-pytest83-xdist36-coverage77 (ubuntu)'
python: 'pypy-3.10'
toxpython: 'pypy3.10'
python_arch: 'x64'
tox_env: 'pypy310-pytest83-xdist36-coverage76'
tox_env: 'pypy310-pytest83-xdist36-coverage77'
os: 'ubuntu-latest'
- name: 'pypy310-pytest83-xdist36-coverage76 (windows)'
- name: 'pypy310-pytest83-xdist36-coverage77 (windows)'
python: 'pypy-3.10'
toxpython: 'pypy3.10'
python_arch: 'x64'
tox_env: 'pypy310-pytest83-xdist36-coverage76'
tox_env: 'pypy310-pytest83-xdist36-coverage77'
os: 'windows-latest'
- name: 'pypy310-pytest83-xdist36-coverage76 (macos)'
- name: 'pypy310-pytest83-xdist36-coverage77 (macos)'
python: 'pypy-3.10'
toxpython: 'pypy3.10'
python_arch: 'arm64'
tox_env: 'pypy310-pytest83-xdist36-coverage76'
tox_env: 'pypy310-pytest83-xdist36-coverage77'
os: 'macos-latest'
steps:
- uses: actions/checkout@v4
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -6,13 +6,13 @@ exclude: '^(\.tox|ci/templates|\.bumpversion\.cfg)(/|$)'
# Note the order is intentional to avoid multiple passes of the hooks
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.5
rev: v0.11.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes, --unsafe-fixes]
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
3 changes: 2 additions & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ Authors
* Marc Abramowitz - \http://marc-abramowitz.com
* Thomas Kluyver - https://github.com/takluyver
* Guillaume Ayoub - http://www.yabz.fr
* Federico Ceratto - http://firelet.net
* Federico Ceratto - \http://firelet.net
* Josh Kalderimis - \http://blog.cookiestack.com
* Ionel Cristian Mărieș - https://blog.ionelmc.ro
* Christian Ledermann - https://github.com/cleder
@@ -62,3 +62,4 @@ Authors
* Matthew Gamble - https://github.com/mwgamble
* Christian Clauss - https://github.com/cclauss
* Dawn James - https://github.com/dawngerpony
* Tsvika Shapira - https://github.com/tsvikas
11 changes: 11 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -2,6 +2,15 @@
Changelog
=========

6.1.0 (2025-04-01)
------------------

* Change terminal output to use full width lines for the coverage header.
Contributed by Tsvika Shapira in `#678 <https://github.com/pytest-dev/pytest-cov/pull/678>`_.
* Removed unnecessary CovFailUnderWarning. Fixes `#675 <https://github.com/pytest-dev/pytest-cov/issues/675>`_.
* Fixed the term report not using the precision specified via ``--cov-precision``.


6.0.0 (2024-10-29)
------------------

@@ -27,6 +36,7 @@ Changelog
Contributed by Dawn James in `#626 <https://github.com/pytest-dev/pytest-cov/pull/626>`_.
* Modernized project's pre-commit hooks to use ruff. Initial POC contributed by
Christian Clauss in `#584 <https://github.com/pytest-dev/pytest-cov/pull/584>`_.
* Dropped support for Python 3.7.

4.1.0 (2023-05-24)
------------------
@@ -43,6 +53,7 @@ Changelog
Contributed by Mark Mayo in `#572 <https://github.com/pytest-dev/pytest-cov/pull/572>`_.
* Fixed a skip in the test suite for some old xdist.
Contributed by a bunch of people in `#565 <https://github.com/pytest-dev/pytest-cov/pull/565>`_.
* Dropped support for Python 3.6.


4.0.0 (2022-09-28)
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -39,9 +39,9 @@ Overview
:alt: Supported implementations
:target: https://pypi.org/project/pytest-cov

.. |commits-since| image:: https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v6.0.0.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v6.1.0.svg
:alt: Commits since latest release
:target: https://github.com/pytest-dev/pytest-cov/compare/v6.0.0...master
:target: https://github.com/pytest-dev/pytest-cov/compare/v6.1.0...master

.. end-badges
6 changes: 5 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
year = '2010-2024'
author = 'pytest-cov contributors'
copyright = f'{year}, {author}'
version = release = '6.0.0'
version = release = '6.1.0'

pygments_style = 'trac'
templates_path = ['.']
@@ -39,6 +39,10 @@
html_split_index = False
html_short_title = f'{project}-{version}'

linkcheck_anchors_ignore_for_url = [
r'^https?://(www\.)?github\.com/.*',
]

napoleon_use_ivar = True
napoleon_use_rtype = False
napoleon_use_param = False
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -72,12 +72,12 @@ def finalize_options(self):
def run(self):
with Path(__file__).parent.joinpath('src', 'pytest-cov.pth').open('w') as fh:
with Path(__file__).parent.joinpath('src', 'pytest-cov.embed').open() as sh:
fh.write(f"import os, sys;exec({sh.read().replace(' ', ' ')!r})")
fh.write(f'import os, sys;exec({sh.read().replace(" ", " ")!r})')


setup(
name='pytest-cov',
version='6.0.0',
version='6.1.0',
license='MIT',
description='Pytest plugin for measuring coverage.',
long_description='{}\n{}'.format(read('README.rst'), re.sub(':[a-z]+:`~?(.*?)`', r'``\1``', read('CHANGELOG.rst'))),
8 changes: 1 addition & 7 deletions src/pytest_cov/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""pytest-cov: avoid already-imported warning: PYTEST_DONT_REWRITE."""

__version__ = '6.0.0'
__version__ = '6.1.0'

import pytest

@@ -27,12 +27,6 @@ class CovReportWarning(PytestCovWarning):
"""


class CovFailUnderWarning(PytestCovWarning):
"""
Indicates that we failed to generate a report.
"""


class CentralCovContextWarning(PytestCovWarning):
"""
Indicates that dynamic_context was set to test_function instead of using the builtin --cov-context.
Loading