This article by Ned Batchelder discusses a significant enhancement in measuring branch coverage with coverage.py, leveraging Python's new sys.monitoring feature introduced in Python 3.12. This improvement allows for more efficient tracking of code execution by disabling repeated event notifications once an event has been recorded, making it faster than the traditional sys.settrace method used previously.
https://nedbatchelder.com/blog/202503/faster_branch_coverage_measurement.html
Post #105
961