Skip to content

coverage precision option #655

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
zx80 opened this issue Sep 15, 2024 · 5 comments
Closed

coverage precision option #655

zx80 opened this issue Sep 15, 2024 · 5 comments

Comments

@zx80
Copy link

zx80 commented Sep 15, 2024

Coverage supports the --precision option which is convenient to adjust reported and expected subpercent coverage, however pytest-cov seems not to offer a corresponding --cov-precision option.

@ionelmc
Copy link
Member

ionelmc commented Sep 15, 2024

Do you really need a cli option for this? You can set it in your coverage config file: https://coverage.readthedocs.io/en/7.6.1/config.html#report-precision

@zx80
Copy link
Author

zx80 commented Sep 16, 2024

Thanks for the feedback. Sure, it is possible.

Philosophically, I try to avoid having files which change the behavior of commands if I can, in order to have a functional command behavior without such hidden side effects.

Option --show-missing has its --cov-show-missing counterpart, why not --precision which is somehow related to that?

@ionelmc
Copy link
Member

ionelmc commented Sep 16, 2024

Well ok. Would you be interested in making a pr?

@zx80
Copy link
Author

zx80 commented Sep 19, 2024

Possibly. I will have a look.

@zx80
Copy link
Author

zx80 commented Nov 9, 2024

👍

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