condition coverage in python

前端 未结 7 852
有刺的猬
有刺的猬 2021-02-07 04:53

Is there any tool/library that calculate percent of \"condition/decision coverage\" of python code. I found only coverage.py but it calculates only percent of \"statement covera

7条回答
  •  独厮守ぢ
    2021-02-07 05:16

    Coverage.py now includes branch coverage.

    For the curious: the code is not modified before running. The trace function tracks which lines follow which in the execution, and compare that information with static analysis of the compiled byte code to find path possibilities not executed.

提交回复
热议问题