3
我在飞行创建测试(我要)在python与如下nosetests运行:蟒蛇nosetests设置测试描述
def my_verification_method(param):
""" description """
assert param>0, "something bad..."
def test_apps():
""" make tests on the fly """
param1 = 1
my_verification_method.__doc__ = "test with param=%i" % param1
yield my_verification_method, param1
param1 = 2
my_verification_method.__doc__ = "test with param=%i" % param1
yield my_verification_method, param1
的问题是,nosetest打印:
make tests on the fly ... ok
make tests on the fly ... ok
这不是我想要的。我想要输入鼻子测试说:
test with param=1 ... ok
test with param=2 ... ok
任何想法?
nosetest生成器功能通常显示您传递的参数,不知道为什么它不适合您的代码。 – schlenk