[issue6391] Incorrect description of unittest.TestCase.run
Ezio Melotti
report at bugs.python.org
Tue Jun 30 23:54:55 CEST 2009
Ezio Melotti <ezio.melotti at gmail.com> added the comment:
>>> class MyTest(TestCase):
... def runTest(self): pass
... def defaultTestCase(self):
... print('defaultTestCase called')
...
>>> test = MyTest()
>>> test.run()
>>> class MyTest(TestCase):
... def runTest(self): pass
... def defaultTestResult(self):
... print('defaultTestResult called')
...
>>> test = MyTest()
>>> test.run()
defaultTestResult called
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Programmi\Python31\lib\unittest.py", line 461, in run
result.startTest(self)
AttributeError: 'NoneType' object has no attribute 'startTest'
I think you are right, here only "defaultTestResult called" is printed
(just before the traceback). Also there's no doc about
defaultTestCase(). The doc can also be clearer about 'result object',
possibly replacing that part with 'a temporary TestResult instance'.
----------
assignee: georg.brandl -> ezio.melotti
nosy: +ezio.melotti
priority: -> normal
versions: +Python 3.0, Python 3.1
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6391>
_______________________________________
More information about the Python-bugs-list
mailing list