summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_argparse.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_argparse.py')
-rw-r--r--Lib/test/test_argparse.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py
index 02b4991..3748529 100644
--- a/Lib/test/test_argparse.py
+++ b/Lib/test/test_argparse.py
@@ -6096,6 +6096,9 @@ class TestExitOnError(TestCase):
with self.assertRaises(argparse.ArgumentError):
self.parser.parse_args('--integers a'.split())
+ def test_exit_on_error_with_unrecognized_args(self):
+ with self.assertRaises(argparse.ArgumentError):
+ self.parser.parse_args('--foo bar'.split())
def tearDownModule():
# Remove global references to avoid looking like we have refleaks.