我想从 Python 脚本运行 NoseTest。但我不仅要运行它,还要测量测试覆盖率。
刚才我有以下代码:
import os
import sys
import nose
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
import tests
if __name__ == "__main__":
config = nose.config.Config(verbosity=3, stopOnError=False, argv=["--with-coverage"])
result = nose.run(module=tests, config=config)
我应该添加什么来获取我的覆盖率报告?