Replies: 1 comment 2 replies
-
That certainly seems to be true. Pydot is now using the action in its CI (pydot/pydot#395), and our most recent run — from a set of pytest runs with branch coverage enabled — has the following values in {
"coverage": 86.44927536231884,
"raw_data": {
"totals": {
"percent_covered": 83.22649572649573,
"percent_covered_display": 83
"num_branches": 492,
"num_partial_branches": 61,
"covered_branches": 365,
"missing_branches": 127
}
}
} So the badge is showing 86%, but the HTML report shows numbers that consistently work out to 83%. It's not the end of the world, but the inconsistency is a bit disconcerting. Is there a reason the action can't just "believe" the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In this discussion, "branch coverage" means the thing that lets you check if all paths through an
if
statement are covered. Completely unrelated to git branches.
I think in some case we're miscalculating branch coverage:
number of executed statements / total number of statements
(executed statements + fully executed branches)/(total statements + total branches)
though I think it's not always consistent and sometimes, it's computed as if branches weren't hereIn #211 , I'm removing branch coverage completely from the equation. But it might be worth investigating if we want to re-add it, though I believe it might be too complex to express in simple terms all the notions, especially given that "branch" is used both for
if
andgit branch
.For now I'll just open this discussion.
Beta Was this translation helpful? Give feedback.
All reactions