]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-140082: Forward colorizing from libregrtest to unittest (#140083)
authorCody Maloney <cmaloney@users.noreply.github.com>
Wed, 29 Oct 2025 12:33:44 +0000 (05:33 -0700)
committerGitHub <noreply@github.com>
Wed, 29 Oct 2025 12:33:44 +0000 (13:33 +0100)
commit6ff62ac4fbc3f17529823c146cc3a3f8c21eed42
treec1ec63bebcbd00baf54cfc68894e8462ef59dd5f
parent376559bf54762d7b6e0a14591a1f284c8f09a855
gh-140082: Forward colorizing from libregrtest to unittest (#140083)

libregrtest redirects test output to a file as part of its operation.
When `unittest` checks to see if it should colorize with
`isatty(sys.stdout)` that fails resulting in no colorizing of the
unittest output.

Update `libregrtest` to set `FORCE_COLOR=1` when redirecting test output
so that unittest will do color printing.

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/libregrtest/setup.py
Lib/test/libregrtest/worker.py
Misc/NEWS.d/next/Tests/2025-10-15-00-52-12.gh-issue-140082.fpET50.rst [new file with mode: 0644]