mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-80448: argparse: Fix IndexError on store_true action (#15656)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
This commit is contained in:
parent
7f3a4b967c
commit
e02cc6d42a
3 changed files with 7 additions and 2 deletions
|
@ -296,7 +296,7 @@ class TestOptionalsSingleDashCombined(ParserTestCase):
|
|||
Sig('-z'),
|
||||
]
|
||||
failures = ['a', '--foo', '-xa', '-x --foo', '-x -z', '-z -x',
|
||||
'-yx', '-yz a', '-yyyx', '-yyyza', '-xyza']
|
||||
'-yx', '-yz a', '-yyyx', '-yyyza', '-xyza', '-x=']
|
||||
successes = [
|
||||
('', NS(x=False, yyy=None, z=None)),
|
||||
('-x', NS(x=True, yyy=None, z=None)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue