开发者

Nosetests & Combined Coverage

I have many projects that I开发者_如何学JAVA'm programatically running:

nosetest --with-coverage --cover-html-dir=happy-sauce/

The problem is that for each project, the coverage module overwrites the index.html file, instead of appending to it. Is there a way to generate a combined super-index.html file, that contains the results for all my projects?

Thanks.


You can't combine the HTML directories. You can combine the .coverage data files, but you'll have to use coverage directly, rather than through nose:

$ nosetest --with-coverage proj1
$ mv .coverage .coverage.1
$ nosetest --with-coverage proj2
$ mv .coverage .coverage.2
$ coverage combine
(combines .coverage.1 and .coverage.2 into a new .coverage)
$ coverage html --directory=happy-sauce


nosetests --with-coverage -i project1/*.py -i project2/*.py

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜