Python nose framework: How to stop execution upon first failure

Question:

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

Asked By: GabiMe

||

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

Answered By: gruszczy
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.