[Pyunit-interest] Newbie question
Brought to you by:
purcell
|
From: Frohnhofer, J. <jam...@cs...> - 2004-09-08 18:42:53
|
Is it expected behavior that the text-based test runner print a stack
traceback upon completion? For example (from the pyunit documentation):
import unittest
class IntegerArithmenticTestCase(unittest.TestCase):
def testAdd(self): ## test method names begin 'test*'
self.assertEquals((1 + 2), 3)
self.assertEquals(0 + 1, 1)
def testMultiply(self):
self.assertEquals((0 * 10), 0)
self.assertEquals((5 * 8), 40)
if __name__ == '__main__':
unittest.main()
When run as a script returns:
>>>
..
----------------------------------------------------------------------
Ran 2 tests in 0.015s
OK
Traceback (most recent call last):
File "H:/Python23/Lib/testest.py", line 12, in ?
unittest.main()
File "H:\Python23\lib\unittest.py", line 721, in __init__
self.runTests()
File "H:\Python23\lib\unittest.py", line 759, in runTests
sys.exit(not result.wasSuccessful())
SystemExit: False
>>>
While I can see the OK and the two dots (..) for success, I would expect
success not to be followed by a stack trace. Am I doing something wrong or am
I being a moron -- a real possibility. I am familiar with xUnit, but fairly
new to Python.
Thanks,
Jim
==============================================================================
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==============================================================================
|