Title: gh-130293: Ensure test__colorize will pass on dumb terminals. by freakboy3742 · Pull Request #130333 · python/cpython · GitHub
Open Graph Title: gh-130293: Ensure test__colorize will pass on dumb terminals. by freakboy3742 · Pull Request #130333 · python/cpython
X Title: gh-130293: Ensure test__colorize will pass on dumb terminals. by freakboy3742 · Pull Request #130333 · python/cpython
Description: #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: TERM=dumb python3.14 -m test test__colorize 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. Issue: gh-130293
Open Graph Description: #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...
X Description: #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....
Opengraph URL: https://github.com/python/cpython/pull/130333
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c60a09e9-8755-d192-4119-8b4b00a535bb |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8AD8:53234:1CBA8BD:276F858:6A4F3DA0 |
| html-safe-nonce | b7a20ff2b546a496012aba480ebaf1777fb9db727ef28d37ec8f7a374f2dfcdf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QUQ4OjUzMjM0OjFDQkE4QkQ6Mjc2Rjg1ODo2QTRGM0RBMCIsInZpc2l0b3JfaWQiOiIyNTM1OTQ5MzA2OTY5NDA2ODgwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 75bb3e14711f9ed5bbb8204732c895c4d58a275da7b2a5a69f25c390c529ecb6 |
| hovercard-subject-tag | pull_request:2346198133 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/130333/files |
| twitter:image | https://avatars.githubusercontent.com/u/37345?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/37345?s=400&v=4 |
| og:image:alt | #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... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width