Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python nose framework: How to stop execution upon first failure

It seems that if a testcase fails, nose will attempt to execute the next testcases. How can I make nose to abort all execution upon the first error in any testcase? I tried sys.exit() but it gave me some ugly and lengthy messages about it

like image 860
GabiMe Avatar asked Jul 28 '10 12:07

GabiMe


1 Answers

There is an option for nose:

-x, --stop Stop running tests after the first error or failure 

Is this what you need?

Following link can help you with all the options available for nosetests. http://nose.readthedocs.org/en/latest/usage.html

like image 91
gruszczy Avatar answered Sep 22 '22 00:09

gruszczy