Closed GoogleCodeExporter closed 9 years ago
I will fix this, but it is common to write this code as
import unittest
if __name__ == '__main__':
unittest.main()
unittest.main() raises a sys.exit() which is not trapped.
Original comment by pyscripter
on 8 Mar 2008 at 4:41
Fixed in version control. Module imports now trap SystemExit exceptions
avoiding
PyScripter closing down in the scenario you described.
Original comment by pyscripter
on 9 Mar 2008 at 3:38
Thanks! That was fast.
So klicking the 'Refresh tests' will still execute the tests, if I omit "if
__name__
== '__main__':", right? No big deal.
Playing around with unittests, I naively just thought, I could skip the if
clause,
because nobody would ever import my dumb test module.
Thanks again
Rainer
Original comment by rainer.m...@gmail.com
on 10 Mar 2008 at 5:37
Tip: Have you tried the Unit Test Wizard (under Tools)
Original comment by pyscripter
on 10 Mar 2008 at 6:42
Nice!
Thanks for the tip
Rainer
Original comment by rainer.m...@gmail.com
on 11 Mar 2008 at 8:24
Original issue reported on code.google.com by
rainer.m...@gmail.com
on 8 Mar 2008 at 4:13