On 13 Nov., 20:20, Chris Rebert [EMAIL PROTECTED] wrote:
try:
unittest.main()
except SystemExit:
pass
You most probably want this instead:
try:
unittest.main()
except SystemExit, exc:
# only exit if tests failed
if exc.code:
raise
--
When I call unittest.main(), it invokes sys.exit(). I would like to run tests
without exiting. How can I?
Alan Baljeu
__
Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo!
Canada Messenger at
On Thu, Nov 13, 2008 at 11:01 AM, Alan Baljeu [EMAIL PROTECTED] wrote:
When I call unittest.main(), it invokes sys.exit(). I would like to run
tests without exiting. How can I?
There's probably a better way that stops it from trying to exit in the
first place, but here's a quick kludge:
Alan Baljeu [EMAIL PROTECTED] writes:
When I call unittest.main(), it invokes sys.exit(). I would like to
run tests without exiting. How can I?
Use a ‘TestRunner’ instance, instead of ‘main()’.
--
\ “If you go flying back through time and you see somebody else |
`\ flying forward