mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
bpo-22815: Print unexpected successes in summary in TextTestResult (GH-30138)
This commit is contained in:
parent
a23ab7b6d8
commit
1944434b44
3 changed files with 40 additions and 8 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue