U
Ulrich Eckhardt
Hi!
The unittest module will invoke sys.exit() after running the tests in order
to signal success or failure. However, I sometimes don't want to exit the
interpreter but instead e.g. inspect some state or just keep the window
open. Normally, using '-i' as commandline argument works, but not in the
case here.
My questions are:
1. Is that a bug? After all, an explicit request on the commandline was
ignored. Is it perhaps simply wrong how the unittest module handles
error/success signalling?
2. I can catch the SystemExit exception and ignore it, but that doesn't
actually help, because then I get a normal exit even in case of failures.
Of course, I could pass that value to sys.exit(), but then I'd be back at
the start.
Any suggestions?
Uli
The unittest module will invoke sys.exit() after running the tests in order
to signal success or failure. However, I sometimes don't want to exit the
interpreter but instead e.g. inspect some state or just keep the window
open. Normally, using '-i' as commandline argument works, but not in the
case here.
My questions are:
1. Is that a bug? After all, an explicit request on the commandline was
ignored. Is it perhaps simply wrong how the unittest module handles
error/success signalling?
2. I can catch the SystemExit exception and ignore it, but that doesn't
actually help, because then I get a normal exit even in case of failures.
Of course, I could pass that value to sys.exit(), but then I'd be back at
the start.
Any suggestions?
Uli