summaryrefslogtreecommitdiff
path: root/Lib/unittest/result.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/unittest/result.py')
-rw-r--r--Lib/unittest/result.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/Lib/unittest/result.py b/Lib/unittest/result.py
index 4538304908..746967ec28 100644
--- a/Lib/unittest/result.py
+++ b/Lib/unittest/result.py
@@ -16,7 +16,9 @@ class TestResult(object):
contain tuples of (testcase, exceptioninfo), where exceptioninfo is the
formatted traceback of the error that occurred.
"""
- def __init__(self):
+ _previousTestClass = None
+ _moduleSetUpFailed = False
+ def __init__(self, stream=None, descriptions=None, verbosity=None):
self.failures = []
self.errors = []
self.testsRun = 0
@@ -25,6 +27,9 @@ class TestResult(object):
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
@@ -107,6 +112,6 @@ class TestResult(object):
return length
def __repr__(self):
- return "<%s run=%i errors=%i failures=%i>" % \
+ return ("<%s run=%i errors=%i failures=%i>" %
(util.strclass(self.__class__), self.testsRun, len(self.errors),
- len(self.failures))
+ len(self.failures)))