如何使用--timid标志使用鼻子覆盖 [英] How to use nose coverage with --timid flag
本文介绍了如何使用--timid标志使用鼻子覆盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用内德·巴切德尔(Ned Batchelder)的报道模块,但将--timid标志传递给coverage模块。
是否有办法(例如设置环境变量)使覆盖范围使用--timid?
I'd like to run "nosetests --with-coverage" using Ned Batchelder's coverage module, but passing the coverage module the --timid flag. Is there a way (e.g. setting an environment variable) to make coverage run with --timid?
推荐答案
您有两个选择:
-
使用.coveragerc文件提供coverage.py
Use a .coveragerc file to provide options to coverage.py
不是在鼻子内部进行覆盖,而是在鼻子内部进行覆盖:
Instead of running coverage inside nose, run nose inside coverage:
coverage run c:\python25\scripts\nosetests-script.py
(抱歉,如果您不在Windows上,则使用Windows语法)
(sorry for the Windows syntax if you aren't on Windows)
这篇关于如何使用--timid标志使用鼻子覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文