运行多进程

时间:2010-12-16 22:39:27

标签: python unit-testing nose python-nose

我正在尝试使用鼻子并行运行测试。

我已经设置了一个nose.cfg文件来包含以下内容:

[nosetests]
verbosity=2
processes=2

我需要能够使用nose.main()或nose.run()以编程方式运行。什么是最好的方法呢?如何选择测试位置?

1 个答案:

答案 0 :(得分:0)

您应该在Python代码中调用nose:

nose.run(defaultTest=test_location)

这会对test_location(通常是目录)下的测试产生影响。

相关问题