-
Notifications
You must be signed in to change notification settings - Fork 228
Description
Summary
I have report: precision set to 2 and fail_under set to 97.47, and my test coverage total is reading as 97.47, but I'm getting a failure message and failure code (exit code 2).
Expected vs actual result
Expected: test coverage passes
Actual: FAIL Required test coverage of 97.47% not reached. Total coverage: 97.47%
I even tried modifying fail_under to 97.469, in which case I got this even more nonsensical message:
FAIL Required test coverage of 97.469% not reached. Total coverage: 97.47%
Reproducer
Versions
Output of relevant packages pip list, python --version, pytest --version etc.
Make sure you include complete output of tox if you use it (it will show versions of various things).
Python 3.7.5
pipenv, version 2018.11.26
pytest version 5.4.1
pytest-cov 2.8.1
Config
Include your tox.ini, pytest.ini, .coveragerc, setup.cfg or any relevant configuration.
# .coveragerc
[report]
fail_under = 97.47
precision = 2
skip_covered = true
show_missing = true
Code
Link to your repository, gist, pastebin or just paste raw code that illustrates the issue.
If you paste raw code make sure you quote it, eg: