FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Improve tests for _colorize.can_colorize() by serhiy-storchaka · Pull Request #129234 · python/cpython · GitHub

Repository navigation

Improve tests for _colorize.can_colorize() - #129234

Merged
hugovk merged 5 commits into
python:mainfrom
serhiy-storchaka:test__colorize
Jan 24, 2025
Merged

hugovk merged 5 commits into
python:mainfrom
serhiy-storchaka:test__colorize

Conversation

Copy link
Copy Markdown
Member

No description provided.

serhiy-storchaka marked this pull request as ready for review January 23, 2025 18:24

hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks, looks good.

import unittest
import unittest.mock
import _colorize
from test.support import force_not_colorized, make_clean_env

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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 <1324225+hugovk@users.noreply.github.com>
hugovk merged commit 7907203 into python:main Jan 24, 2025

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

hugovk commented Jan 24, 2025

Copy link
Copy Markdown
Member

Thanks!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 24, 2025
(cherry picked from commit 7907203)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

bedevere-app Bot commented Jan 24, 2025

Copy link
Copy Markdown

GH-129265 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 only security fixes label Jan 24, 2025
serhiy-storchaka added a commit that referenced this pull request Jan 24, 2025
)

(cherry picked from commit 7907203)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
serhiy-storchaka deleted the test__colorize branch July 1, 2026 16:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip issue skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL