[New-bugs-announce] [issue45631] missing unittests for overlapping dest when using subparsers
paul j3
report at bugs.python.org
Wed Oct 27 12:36:51 EDT 2021
New submission from paul j3 <ajipanca at gmail.com>:
https://bugs.python.org/issue45235
argparse does not preserve namespace with subparser defaults
was passed and put into the latest release with rather obvious buggy behavior.
This means that the unittest file does not adequately test for overlapping 'dest' in the main and subparsers. It probably also does not test many (any?) cases of user provided namespace.
Issue9351 added a test, but it only tested defaults set with
parser.set_defaults(foo=1)
xparser.set_defaults(foo=2)
not the more common practice of setting defaults in add_argument.
45235 adds one test, but again only for
xparser.set_defaults(foo=1)
It doesn't test for user inputs, as with
['X','--foo=3']
----------
messages: 405110
nosy: ALSchwalm, paul.j3, rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: missing unittests for overlapping dest when using subparsers
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45631>
_______________________________________
More information about the New-bugs-announce
mailing list