Skip to content
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

"Fail under check" is failing because of ignoring the precession config #638

Open
tanaydin opened this issue Apr 2, 2024 · 0 comments
Open

Comments

@tanaydin
Copy link

tanaydin commented Apr 2, 2024

I'm configuring coverage report in pyproject.toml like

[tool.coverage.report]
precision = 1

and trying to get json report with fail-under configured like

poetry run pytest --cov --cov-append --cov-fail-under=80.2 --cov-report=json

but in the following check, it's failing

failed = self.cov_total < self.options.cov_fail_under

as

FAIL Required test coverage of 80.2% not reached. Total coverage: 80.16%

Because self.cov_total is something like 80.1634243243 it should be rounding 80.16 to 80.20 and pass.

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

1 participant