0
一个共同的设置功能,所以我有一个剧本test.py具有测试
from nose.tools import with_setup
class Test:
@with_setup(setup_func, teardown_func)
def test(self):
print "Hello World"
我能有setup_func(),并在同一目录中的初始化的.py定义为“测试teardown_func() py”为。
基本上,目标是对一堆测试用例进行通用设置和拆卸。
哇我从来不知道我可以从__init__.py导入到其他模块..是真的吗? – user2921139 2014-12-05 01:22:12
为什么我不能在网上找到证实这一点的东西? – user2921139 2014-12-05 15:21:19