MCPcopy Index your code
hub / github.com/python/cpython / printErrors

Method printErrors

Lib/unittest/runner.py:152–167  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

150 self.stream.flush()
151
152 def printErrors(self):
153 t = self._theme
154 if self.dots or self.showAll:
155 self.stream.writeln()
156 self.stream.flush()
157 self.printErrorList(f"{t.fail}ERROR{t.reset}", self.errors)
158 self.printErrorList(f"{t.fail}FAIL{t.reset}", self.failures)
159 unexpectedSuccesses = getattr(self, "unexpectedSuccesses", ())
160 if unexpectedSuccesses:
161 self.stream.writeln(self.separator1)
162 for test in unexpectedSuccesses:
163 self.stream.writeln(
164 f"{t.fail}UNEXPECTED SUCCESS{t.fail_info}: "
165 f"{self.getDescription(test)}{t.reset}"
166 )
167 self.stream.flush()
168
169 def printErrorList(self, flavour, errors):
170 t = self._theme

Callers 1

runMethod · 0.45

Calls 4

printErrorListMethod · 0.95
getDescriptionMethod · 0.95
writelnMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected