-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
gh-130293: Ensure test__colorize will pass on dumb terminals. #130333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
!buildbot iOS |
🤖 New build scheduled with the buildbot fleet by @freakboy3742 for commit 096c689 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F130333%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Misc/NEWS.d/next/Tests/2025-02-20-13-39-12.gh-issue-130293.5igSsu.rst
Outdated
Show resolved
Hide resolved
Misc/NEWS.d/next/Tests/2025-02-20-13-39-12.gh-issue-130293.5igSsu.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Hugo van Kemenade <[email protected]>
Thanks @freakboy3742 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…ythonGH-130333) Ensure colorize tests will run on dumb terminals (or environment with TERM=dumb set) Co-authored-by: Hugo van Kemenade <[email protected]> (cherry picked from commit 1b07006) Co-authored-by: Russell Keith-Magee <[email protected]>
GH-130334 is a backport of this pull request to the 3.13 branch. |
…H-130333) (#130334) Ensure colorize tests will run on dumb terminals (or environment with TERM=dumb set) (cherry picked from commit 1b07006) Co-authored-by: Russell Keith-Magee <[email protected]>
…nals. (pythonGH-130333) (python#130334) Ensure colorize tests will run on dumb terminals (or environment with TERM=dumb set) (cherry picked from commit 1b07006) Co-authored-by: Russell Keith-Magee <[email protected]>
…nals. (pythonGH-130333) (python#130334) Ensure colorize tests will run on dumb terminals (or environment with TERM=dumb set) (cherry picked from commit 1b07006) Co-authored-by: Russell Keith-Magee <[email protected]>
…als. (pythonGH-130333) (python#130334) Ensure colorize tests will run on dumb terminals (or environment with TERM=dumb set) (cherry picked from commit 1b07006) Co-authored-by: Russell Keith-Magee <[email protected]>
#129140 slightly modified the logic associated with determining if a console could be colorised. In doing so, the test became sensitive to the test environment's value for the TERM setting.
The iOS 18.2 test simulator sets
TERM=dumb
in the test environment - this makes some sense, as stdout/stderr handling is performed by the system log, which won't honor tty control sequences.This appears to be a recent change to iOS; it wasn't true in iOS 17.2. With the recent update to the iOS buildbot, the problem became apparent.
However, the issue isn't iOS specific - it will occur on any machine where
TERM=dumb
is set in the testing environment. On macOS, I can reproduce the issue with:This PR ensures that TERM is correctly mocked as part of the colorise test, and normalizes the name used by the iOS Testbed to disable terminal colors.