When you configure the following in `pyproject.toml`: ```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
MarcBresson commentedon Feb 26, 2025
Hello, I have the same issue using pytest-cov 6.0.0 and coverage 7.6.12
Make sure the CLI precision is used when creating report. Fixes #674.
Make sure the CLI precision is used when creating report. Fixes pytes…