简体   繁体   English

如何获得鼻子测试以按顺序运行测试?

[英]How to get nosetests to run tests in sequence?

No matter what I try, I can't seem to get nosetests to run my unittests in sequence instead of concurrently. 无论我尝试什么,我似乎都无法获得nosetests来按顺序而不是同时运行单元测试。 I want it to first run one test, and then when that test is done, to run another test, etc. However it keeps on interweaving them, which because of the tests I'm running is very troublesome. 我希望它首先运行一个测试,然后在完成该测试时运行另一个测试,依此类推。但是它一直在交织在一起,由于我正在运行这些测试,因此非常麻烦。 What can I do to turn this off? 我该怎么做才能将其关闭? I've been looking around and the closest thing I've seen is running it with --processes=0 , which didn't work. 我一直在环顾四周,我所看到的最接近的东西是使用--processes=0来运行它,但没有用。

Check to see if you have the NOSE_PROCESSES environment variable set in your terminal: 检查终端中是否设置了NOSE_PROCESSES环境变量:

on linux/OS X: 在linux / OS X上:

echo $NOSE_PROCESSES

on windows: 在Windows上:

echo %NOSE_PROCESSES%

Additionally check if you have a setup.cfg file in your project directory. 另外,检查项目目录中是否有setup.cfg文件。 If you do and you have a line like the following it may be overriding your command line switch: 如果这样做,并且您有类似以下的一行,则可能是覆盖了您的命令行开关:

processes=4

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM