首页 > 编程语言 > 详细

Python: 关于nose

时间:2016-11-17 12:59:33      阅读:273      评论:0      收藏:0      [点我收藏+]

1. 使用rednose增强输出

pip install rednose
nosetests --rednose tests

2. 使用coverage

pip install coverage
nosetests --with-coverage --cover-html tests

随后可以在cover目录中查看生成的html报表

3. nose测试中默认捕获测试通过的case中的print输出,如果想要输出结果,可以加入以下参数

nosetests --nocapture mytest.py

 

Python: 关于nose

原文:http://www.cnblogs.com/ilovewindy/p/6073116.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!