Disabling nose coverage report to STDOUT when HTML report is enabled?

折月煮酒 提交于 2019-12-04 02:33:36
scjody

(Taken from this related question)

You can install nose-cov:

pip install nose-cov

which has more control over reporting options. Then, change --with-coverage to --with-cover, e.g.

NOSE_ARGS = [
 '--with-cov',
 '--cov-report', 'html',
]

which will export to HTML but suppress console output.

A quick-and-dirty fix is to comment out the line that generates the unformatted coverage report in nose/plugins/cover.py:

def report(self, stream):
    ....
    log.debug("Coverage report will cover modules: %s", modules)
    #self.coverInstance.report(modules, file=stream)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!