views:

40

answers:

1

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

+3  A: 

There is an option for nose:

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

Is this what you need?

gruszczy
Yes, Thanks! and while we are on it how do I:1. Prevent printing the ugly stack trace upon failure?2. Exit the current test suite upon failure but continue executing the rest of them
bugspy.net
I don't really use nose :-), I was just pretty sure it must have fail fast option (just django test framework has), so I took a look at nose options: http://somethingaboutorange.com/mrl/projects/nose/0.11.2/usage.html#options
gruszczy