Skip to content

--cov-precision does not affect report #674

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

Closed
not-my-profile opened this issue Jan 29, 2025 · 1 comment
Closed

--cov-precision does not affect report #674

not-my-profile opened this issue Jan 29, 2025 · 1 comment

Comments

@not-my-profile
Copy link

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.

@MarcBresson
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants