From e27c90b25a5476cd10d3157093c31cd18f5f5eef Mon Sep 17 00:00:00 2001 From: Trevor Burns Date: Sat, 7 Jun 2025 12:13:22 -0400 Subject: [PATCH] Add tearDown for _colorize.can_colorize modification in test_argparse --- Lib/test/test_argparse.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py index 08ff41368d9bb0..f4afec81cfa397 100644 --- a/Lib/test/test_argparse.py +++ b/Lib/test/test_argparse.py @@ -7107,9 +7107,13 @@ class TestColorized(TestCase): def setUp(self): super().setUp() # Ensure color even if ran with NO_COLOR=1 + self.original_can_colorize = _colorize.can_colorize _colorize.can_colorize = lambda *args, **kwargs: True self.theme = _colorize.get_theme(force_color=True).argparse + def tearDown(self): + _colorize.can_colorize = self.original_can_colorize + def test_argparse_color(self): # Arrange: create a parser with a bit of everything parser = argparse.ArgumentParser( pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy