Skip to content
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

gh-121018: ensure ArgumentParser.parse_args with exit_on_error=False raises instead of exiting when given unrecognized arguments #121019

Merged
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
fixed typo
  • Loading branch information
blhsing authored Jun 26, 2024
commit ffa758b184e18ff5683b8ee389cd98cffc1d5cc5
2 changes: 1 addition & 1 deletion Lib/test/test_argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -6053,7 +6053,7 @@ def test_exit_on_error_with_bad_args(self):
with self.assertRaises(argparse.ArgumentError):
self.parser.parse_args('--integers a'.split())

def test_exit_on_error_with_unrecoginized_args(self):
def test_exit_on_error_with_unrecognized_args(self):
with self.assertRaises(argparse.ArgumentError):
self.parser.parse_args('--foo bar'.split())

Expand Down
Loading