How to properly use coverage.py in Python?

前端 未结 3 1299
暗喜
暗喜 2020-12-23 17:03

I\'ve just started using Coverage.py module and so decided to make a simple test to check how it works.

Sample.py

def sum(num1, num2         


        
3条回答
  •  抹茶落季
    2020-12-23 17:45

    The below command worked for me:

    coverage run --source=sample -m pytest test.py
    
    coverage report -m
    

提交回复
热议问题