Skip to content

Commit 220c9a9

Browse files
committed
Fix test relying on default
1 parent d89cf4f commit 220c9a9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_argparse.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2331,13 +2331,14 @@ def test_wrong_argument_subparsers_no_suggestions(self):
23312331
excinfo.exception.stderr,
23322332
)
23332333

2334-
def test_wrong_argument_no_suggestion_implicit(self):
2334+
def test_wrong_argument_with_suggestion_implicit(self):
23352335
parser = ErrorRaisingArgumentParser()
23362336
parser.add_argument('foo', choices=['bar', 'baz'])
23372337
with self.assertRaises(ArgumentParserError) as excinfo:
23382338
parser.parse_args(('bazz',))
23392339
self.assertIn(
2340-
"error: argument foo: invalid choice: 'bazz' (choose from bar, baz)",
2340+
"error: argument foo: invalid choice: 'bazz', maybe you meant"
2341+
" 'baz'? (choose from bar, baz)",
23412342
excinfo.exception.stderr,
23422343
)
23432344

0 commit comments

Comments
 (0)