On Thu, Nov 13, 2008 at 11:01 AM, Alan Baljeu <alanbaljeu@yah oo.comwrote:
There's probably a better way that stops it from trying to exit in the
first place, but here's a quick kludge:
try:
unittest.main()
except SystemExit:
pass
sys.exit() does its job by noting the return code and then raising the
SystemExit exception, which you are free to catch.
Cheers,
Chris
--
Follow the path of the Iguana...
When I call unittest.main() , it invokes sys.exit(). I would like to run tests without exiting. How can I?
first place, but here's a quick kludge:
try:
unittest.main()
except SystemExit:
pass
sys.exit() does its job by noting the return code and then raising the
SystemExit exception, which you are free to catch.
Cheers,
Chris
--
Follow the path of the Iguana...
>
>
Alan Baljeu
>
>
_______________ _______________ _______________ _______________ ______
Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/
--
>
>
Alan Baljeu
>
>
_______________ _______________ _______________ _______________ ______
Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/
--
>
Comment