-
Notifications
You must be signed in to change notification settings - Fork 200
Closed
Description
Hi, thanks for this library. It is very helpful in our project!
I think I found an issue, false negative, that affects overall quality of diff-cover check in a specific use case.
I use diff-cover 6.4.4 with coverage.py in version 6.2 through pytest-cov in version 3.0.0 with Cobertura XML report.
- Recently I updated function call in my production code (the signature of the function I use changed, it has a new argument, and I've added new keyword argument to the call)
- This production call has no test coverage.
- Diff-cover doesn't fail for the line with a new argument in the function call.
Expected:
- Diff-cover fails for the line with a new argument in function call because of lack of the coverage.
Details: I think that probably diff-cover ignores lines without coverage report, and probably (?) it should for every changed line in diff search for first line above with reported coverage. On the image below red line point to lines not covered by tests (GitLab supports Cobertura reports).
$ diff-cover coverage.xml --fail-under 100 --html-report diff-cover.html --compare-branch origin/develop
-------------
Diff Coverage
Diff: origin/develop...HEAD, staged and unstaged changes
-------------
…/file_on_screenshot.py (100%)
…/obfuscated.py (100%)
…/obfuscated2.py (100%)
-------------
Total: 13 lines
Missing: 0 lines
Coverage: 100%
-------------
michalbon, christianbundy, Nosterx, matsjoyce-refeyn and ento
Metadata
Metadata
Assignees
Labels
No labels