Skip to content

Commit

Permalink
Don't colour the separators
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Nov 24, 2024
1 parent d01272f commit 06f1318
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Lib/unittest/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def printErrors(self):
self.printErrorList(f"{red}FAIL{reset}", self.failures)
unexpectedSuccesses = getattr(self, "unexpectedSuccesses", ())
if unexpectedSuccesses:
self.stream.writeln(f"{bold_red}{self.separator1}{reset}")
self.stream.writeln(self.separator1)
for test in unexpectedSuccesses:
self.stream.writeln(
f"{red}UNEXPECTED SUCCESS{bold_red}: "
Expand All @@ -171,11 +171,11 @@ def printErrors(self):
def printErrorList(self, flavour, errors):
bold_red, reset = self._ansi.BOLD_RED, self._ansi.RESET
for test, err in errors:
self.stream.writeln(f"{bold_red}{self.separator1}{reset}")
self.stream.writeln(self.separator1)
self.stream.writeln(
f"{flavour}{bold_red}: {self.getDescription(test)}{reset}"
)
self.stream.writeln(f"{bold_red}{self.separator2}{reset}")
self.stream.writeln(self.separator2)
self.stream.writeln("%s" % err)
self.stream.flush()

Expand Down

0 comments on commit 06f1318

Please sign in to comment.