pytest-cov
pytest-cov copied to clipboard
Removing message formatting rounding
When defining a coverage threshold (88.45 for example) and the actual coverage is very close (88.449 for example) we will get a failure message. However, the message will be: "FAIL Required test coverage of 88.45% not reached. Total coverage: 88.45%" where it's wrong and confusing since we failed because it's under while it the message it presented as equal. The removing of the rounding will fix it.
Hello @AdiKrasin, can this fix get merged and released?
@ionelmc Can you have a look at this? Thanks again
If you are not ok with this change, I'll gladly come up with a PR fixing it as well matching your expectations. This is a long standing issue that is quite painful with long running test suites (because it's a pain to relaunch it to know the coverage) that are distributed (so cannot run with coverage only).
I'd argue a more in-line change would be to read the coverage "precision" setting and report it the same way coverage is. Is that something you would be willing to merge and release?