unittest.TestResult can now be used with the TextTestRunner. TextTestRunner compatible with old TestResult objects.
diff --git a/Lib/unittest/result.py b/Lib/unittest/result.py
index bb2a47c..22e825a 100644
--- a/Lib/unittest/result.py
+++ b/Lib/unittest/result.py
@@ -16,7 +16,7 @@
contain tuples of (testcase, exceptioninfo), where exceptioninfo is the
formatted traceback of the error that occurred.
"""
- def __init__(self):
+ def __init__(self, stream=None, descriptions=None, verbosity=None):
self.failures = []
self.errors = []
self.testsRun = 0
@@ -25,6 +25,9 @@
self.unexpectedSuccesses = []
self.shouldStop = False
+ def printErrors(self):
+ "Called by TestRunner after test run"
+
def startTest(self, test):
"Called when the given test is about to be run"
self.testsRun += 1