-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Improve tests for _colorize.can_colorize() #129234
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
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.
Thanks, looks good.
import sys | ||
import unittest | ||
import unittest.mock | ||
import _colorize | ||
from test.support import force_not_colorized, make_clean_env |
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.
make_clean_env
was moved to test.support
from the PyREPL tests for use in this file (in #127877).
If we're not using it here any more, should we move it back, or leave it in case it's useful for others later?
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.
I do not know. I tried to use make_clean_env()
, but we need to remove also NO_COLOR
. On other hand, the only PYTHON*
variable that needs to be removed is PYTHON_COLORS
. Let it be there for now, and then we'll see.
Co-authored-by: Hugo van Kemenade <[email protected]>
Thanks @serhiy-storchaka for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Thanks! |
(cherry picked from commit 7907203) Co-authored-by: Serhiy Storchaka <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
GH-129265 is a backport of this pull request to the 3.13 branch. |
) (cherry picked from commit 7907203) Co-authored-by: Serhiy Storchaka <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
No description provided.