summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/unittest/runner.py')
-rw-r--r--Lib/unittest/runner.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/unittest/runner.py b/Lib/unittest/runner.py
index 120ee6a..6678adb 100644
--- a/Lib/unittest/runner.py
+++ b/Lib/unittest/runner.py
@@ -142,6 +142,12 @@ class TextTestResult(result.TestResult):
self.stream.flush()
self.printErrorList('ERROR', self.errors)
self.printErrorList('FAIL', self.failures)
+ unexpectedSuccesses = getattr(self, 'unexpectedSuccesses', ())
+ if unexpectedSuccesses:
+ self.stream.writeln(self.separator1)
+ for test in unexpectedSuccesses:
+ self.stream.writeln(f"UNEXPECTED SUCCESS: {self.getDescription(test)}")
+ self.stream.flush()
def printErrorList(self, flavour, errors):
for test, err in errors: