Re: unittest exits

2008-11-19 Thread jhermann
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 --

Re: unittest exits

2008-11-13 Thread Ben Finney
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 forwa

Re: unittest exits

2008-11-13 Thread Chris Rebert
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:

unittest exits

2008-11-13 Thread Alan Baljeu
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 http