Codecov.io report doesn't match Coverage.py when branch coverage is enabled
See original GitHub issueIssue Description
Not sure if the same issue as #125, but I noticed that when I have branch coverage in coverage.py, the reported coverage in Codecov doesn’t match (without coverage both work exactly the same).
The issue appears to be that Codecov doesn’t compute branch-coverage the same way as Coverage.py.
This is the reported coverage without branch-coverage in both Coverage.py and Codecov (they match).
And this is the reported coverage with branch-coverage:
After comparing the reports with branch-coverage, it looks to me that Coverage.py looks at branches in the whole source code, including missed statements. While Codecov.io appears to ignore missed statements.
The file data_store_mgr.py
, for example, has the exact same coverage in Codecov.io when branch analysis is enabled and when it is disabled.
But with coverage.py that number is different. And the reason is that there are missed branches in the missed statements. So coverage.py considers those branches as missed too, while Codecov.io appears to not take those into consideration - which means it reports the same as if there was no branch analysis enabled, as there are no missed branches.
It would make more sense, in my opinion, to include the missed branches of the missed statements too - as the user specifically said s/he is interested in branch-coverage.
Cheers Bruno
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
@kinow FWIW I am using branch coverage for/with many projects, and codecov reports it properly.
I am not saying there might not be an issue somewhere of course. It still is more an issue with the server/backend then - so creating a support ticket is the way to go I think, yes.
I am afraid that if you use pyproject.toml, this feature is not working. See https://github.com/codecov/codecov-python/issues/107#issuecomment-1327939466