condition coverage in python

前端 未结 7 841
有刺的猬
有刺的猬 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:20

    Are you looking for cyclomatic complexity (Wikipedia)? It basically computes the number of paths through a piece of code. There are some projects to compute that for Python code, for example PyMetrics or this one. Google will certainly bring up more.

    But I don't know of any further integration with unit tests that will show you the coverage.

提交回复
热议问题