Coverage branches instead of arcs
Briefly

Mark Shannon has been enhancing the sys.monitoring API to enable branch coverage with minimal overhead, allowing coverage.py to utilize these new features effectively.
The refactoring aimed at focusing tests on branches rather than code pathways has streamlined the process considerably, simplifying the parser and eliminating unnecessary complexity.
By ditching the need to map complete pathways and instead focusing on branches, we can directly ascertain which branches were taken while improving efficiency.
With the advent of sys.monitoring events, complex techniques previously considered for branch coverage, like inserting fake lines, are now redundant, which simplifies implementation.
Read at Nedbatchelder
[
]
[
|
]