mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-128595: Default to stdout isatty for colour detection instead of stderr (#128498)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
a429159797
commit
6f167d7134
8 changed files with 38 additions and 23 deletions
|
@ -45,7 +45,7 @@ class TextTestResult(result.TestResult):
|
|||
self.showAll = verbosity > 1
|
||||
self.dots = verbosity == 1
|
||||
self.descriptions = descriptions
|
||||
self._ansi = get_colors()
|
||||
self._ansi = get_colors(file=stream)
|
||||
self._newline = True
|
||||
self.durations = durations
|
||||
|
||||
|
@ -286,7 +286,7 @@ class TextTestRunner(object):
|
|||
expected_fails, unexpected_successes, skipped = results
|
||||
|
||||
infos = []
|
||||
ansi = get_colors()
|
||||
ansi = get_colors(file=self.stream)
|
||||
bold_red = ansi.BOLD_RED
|
||||
green = ansi.GREEN
|
||||
red = ansi.RED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue