]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-140082: Forward colorizing from libregrtest to unittest (GH-140083) (#140756)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 29 Oct 2025 18:11:24 +0000 (19:11 +0100)
committerGitHub <noreply@github.com>
Wed, 29 Oct 2025 18:11:24 +0000 (18:11 +0000)
commit0779ef9a63303d84d007ade0787829cf4e734d45
tree3fa66bf29db855da60ae07aaba5304d63dbf1944
parent6d0e1c8478cbf3d16f7dd9ef3c947de8c9a46a11
[3.14] gh-140082: Forward colorizing from libregrtest to unittest (GH-140083) (#140756)

gh-140082: Forward colorizing from libregrtest to unittest (GH-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.
(cherry picked from commit 6ff62ac4fbc3f17529823c146cc3a3f8c21eed42)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
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]