D
Dave Harris
Something to think about...I'm not sure if this is a problem for anyone.
IDLE currently issues a traceback when running a program which contains sys.exit(). For example, the program:
if __name__ == "__main__":
sys.exit(False)
shows the following in the IDLE shell window:
Traceback (most recent call last):
File "C:\rascal\dev\pylearn\odbchelpertest.py", line 8, in -toplevel-
sys.exit(False)
SystemExit: False
If that's the way it's supposed to work, fine.
But unittest wraps up the runTests() function with the line:
sys.exit(not result.wasSuccessful())
So, I always get a traceback whenever I run a test program in IDLE. (The command-line invocation works silently, which I would expect.)
My resolution is simple: I won't use IDLE to exercise my unit tests.
Python 2.3b2 (#43, Jun 29 2003, 16:43:04) [MSC v.1200 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
IDLE 1.0b2
IDLE currently issues a traceback when running a program which contains sys.exit(). For example, the program:
if __name__ == "__main__":
sys.exit(False)
shows the following in the IDLE shell window:
Traceback (most recent call last):
File "C:\rascal\dev\pylearn\odbchelpertest.py", line 8, in -toplevel-
sys.exit(False)
SystemExit: False
If that's the way it's supposed to work, fine.
But unittest wraps up the runTests() function with the line:
sys.exit(not result.wasSuccessful())
So, I always get a traceback whenever I run a test program in IDLE. (The command-line invocation works silently, which I would expect.)
My resolution is simple: I won't use IDLE to exercise my unit tests.
Python 2.3b2 (#43, Jun 29 2003, 16:43:04) [MSC v.1200 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
IDLE 1.0b2