Skip to content

GH-130645: Default to color help in argparse #136809

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

Merged
merged 7 commits into from
Jul 20, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update tests
  • Loading branch information
hugovk committed Jul 19, 2025
commit dddcd65c04e26d2974e361253b8095e10254ab63
2 changes: 2 additions & 0 deletions Lib/test/test_argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -6049,6 +6049,7 @@ def test_argument_error(self):

class TestArgumentTypeError(TestCase):

@force_not_colorized
def test_argument_type_error(self):

def spam(string):
Expand Down Expand Up @@ -7013,6 +7014,7 @@ def test_os_error(self):
self.parser.parse_args, ['@no-such-file'])


@force_not_colorized_test_class
class TestProgName(TestCase):
source = textwrap.dedent('''\
import argparse
Expand Down
1 change: 1 addition & 0 deletions Lib/test/test_clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2792,6 +2792,7 @@ def test_cli_verbose(self):
out = self.expect_success("-v", fn)
self.assertEqual(out.strip(), fn)

@support.force_not_colorized
def test_cli_help(self):
out = self.expect_success("-h")
self.assertIn("usage: clinic.py", out)
Expand Down
Loading