到目前为止,我用了一个很好的测试程序。在
为了确保我的设置只执行一次,我使用了一个布尔变量
def setUp(self):
if not self.setupOk:
selTest.setupOk = True
# start selenium
# do other stuff which will be needed for all other tests to be able to run
现在我想用选项--processes=5运行nosetests
如何确保setUp(self)只由一个进程执行(而其他进程正在等待)。在
我试着和
^{pr2}$但这似乎行不通。在
在运行每个测试之前将调用安装程序。如果希望方法只执行一次,可以使用setUpClass:
相关问题 更多 >
编程相关推荐