Skip to content

Commit

Permalink
Fixed duplicate subparser name in test_add_parser_custom_completer
Browse files Browse the repository at this point in the history
If I'm not mistaken, the use of the same name for both subparsers was
not intentional but a typo.  In Python 3.11, this is an error and causes
the test to fail.

Fixes #1228
  • Loading branch information
mgorny authored and kmvanbrunt committed May 23, 2022
1 parent a222470 commit a3c10b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_argparse_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1371,5 +1371,5 @@ def test_add_parser_custom_completer():
no_custom_completer_parser = subparsers.add_parser(name="no_custom_completer")
assert no_custom_completer_parser.get_ap_completer_type() is None # type: ignore[attr-defined]

custom_completer_parser = subparsers.add_parser(name="no_custom_completer", ap_completer_type=CustomCompleter)
custom_completer_parser = subparsers.add_parser(name="custom_completer", ap_completer_type=CustomCompleter)
assert custom_completer_parser.get_ap_completer_type() is CustomCompleter # type: ignore[attr-defined]

0 comments on commit a3c10b6

Please sign in to comment.