finally:
result.stopTest(self)
- __call__ = run
+ def __call__(self, *args, **kwds):
+ return self.run(*args, **kwds)
def debug(self):
"""Run the test without collecting errors in a TestResult"""
self.addTest(test)
def run(self, result):
- return self(result)
-
- def __call__(self, result):
for test in self._tests:
if result.shouldStop:
break
test(result)
return result
+ def __call__(self, *args, **kwds):
+ return self.run(*args, **kwds)
+
def debug(self):
"""Run the tests without collecting errors in a TestResult"""
for test in self._tests: test.debug()
Library
-------
+- unittest.TestCase.run() and unittest.TestSuite.run() can now be successfully
+ extended or overridden by subclasses. Formerly, the subclassed method would
+ be ignored by the rest of the module. (Bug #1078905).
+
- the deprecated whrandom module was removed. Use the random module instead.
- heapq.nsmallest() and heapq.nlargest() now support key= arguments with