coveragepy icon indicating copy to clipboard operation
coveragepy copied to clipboard

Add explanation and examples for symbols used when displaying branch coverage

Open jugmac00 opened this issue 1 year ago • 1 comments

Yesterday, CI was broken as one branch was not covered, see

plugins.py                       210      0     50      1    99%   303->302

Screenshot from 2023-03-30 19-41-17

While the arrow symbols for if/else branches are more or less self explanatory, here I did not understand what it means.

I then had a look at

  • https://coverage.readthedocs.io/en/7.2.2/branch.html
  • https://coverage.readthedocs.io/en/7.2.2/cmd.html#coverage-summary-coverage-report
  • https://coverage.readthedocs.io/en/7.2.2/faq.html but did not find any explanation. I then reached out to a online chat, where I was helped: The for-loop is not exhausted

I'd like to have examples for both if/else and for-loops (and maybe other special things), and explanations for those examples, ideally at the branch coverage page, and maybe a link from the cmd.html page, where the branch coverage example is shown, a la "more examples and explanations at ...".

Thank you!

jugmac00 avatar Mar 31 '23 11:03 jugmac00

I will be working on this one as a part of pycon23 Sprint.

kkkoo7 avatar Apr 24 '23 19:04 kkkoo7