Skip to content

--cov-precision does not affect report #674

Closed

Description

@not-my-profile

When you configure the following in pyproject.toml:

[tool.coverage.report]
precision = 2

you get the output:

Name                Stmts   Miss   Cover
----------------------------------------
mypkg/__init__.py       0      0 100.00%
mypkg/bar.py            4      4   0.00%
mypkg/foo.py            2      2   0.00%
----------------------------------------
TOTAL                   6      6   0.00%

However when you don't configure that and only use the recently introduced --cov-precision option you still get:

Name                Stmts   Miss  Cover
---------------------------------------
mypkg/__init__.py       0      0   100%
mypkg/bar.py            4      4     0%
mypkg/foo.py            2      2     0%
---------------------------------------
TOTAL                   6      6     0%

That is the --cov-precision option doesn't affect the generated reports at all.

Activity

  1. MarcBresson commented on Feb 26, 2025

    @MarcBresson

    Hello, I have the same issue using pytest-cov 6.0.0 and coverage 7.6.12

  2. added a commit that references this issue on Mar 31, 2025
    b502063
  3. added a commit that references this issue on Jul 20, 2025
    e760099
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions