Skip to content

Conversation

@tpburns
Copy link
Contributor

@tpburnstpburns commented Jun 7, 2025

See test_regrtestTestColorized and test_pdbPdbTestColorize for similar tests with safe setups.

withunittest.mock.patch(
"_colorize.can_colorize", return_value=True
):
result=results.get_state(fail_env_changed=False)

defsetUp(self):
self._original_can_colorize=_colorize.can_colorize
# Force colorize to be enabled because we are sending data
# to a StringIO
_colorize.can_colorize=lambda*args, **kwargs: True
deftearDown(self):
_colorize.can_colorize=self._original_can_colorize

@picnixzpicnixz changed the title gh-135237 Add tearDown for _colorize.can_colorize modification in test_argparsegh-135237: Add tearDown for _colorize.can_colorize modification in test_argparseJun 7, 2025
@sobolevnsobolevn added the needs backport to 3.14 bugs and security fixes label Jun 7, 2025
@sobolevnsobolevn removed the needs backport to 3.14 bugs and security fixes label Jun 7, 2025
@picnixzpicnixz changed the title gh-135237: Add tearDown for _colorize.can_colorize modification in test_argparsegh-135237: fix setUp/tearDown of _colorize.can_colorize in test_argparseJun 7, 2025
@ZeroIntensityZeroIntensity added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jun 7, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @ZeroIntensity for commit e27c90b 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F135238%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jun 7, 2025
Copy link
Member

@ZeroIntensityZeroIntensity left a comment

Choose a reason for hiding this comment

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

Buildbot failures are unrelated

@hugovk
Copy link
Member

Closing re: #135237 (comment)

Thanks anyway!

@hugovkhugovk closed this Oct 12, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting mergeskip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@tpburns@bedevere-bot@hugovk@sobolevn@ZeroIntensity@picnixz