This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bethard
Recipients Danh, atfrase, bethard, wm
Date 2012-07-22.21:17:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1342991871.46.0.860963829286.issue11354@psf.upfronthosting.co.za>
In-reply-to
Content
The tests look like they're testing the right things, but the tests should instead be written like the rest of the argparse tests. For example, look at TestOptionalsNargs3 and TestPositionalsNargs2. You could write your tests to look something like those, e.g.

class TestOptionalsNargs1_3(ParserTestCase):

    argument_signatures = [Sig('-x', nargs=(1, 3))]
    failures = ['a', '-x', '-x a b c d']
    successes = [
        ('', NS(x=None)),
        ('-x a', NS(x=['a'])),
        ('-x a b', NS(x=['a', 'b'])),
        ('-x a b c', NS(x=['a', 'b', 'c'])),
    ]

Also, a complete patch will need to document the new feature in the Python documentation, among other things. See the details described here:

http://docs.python.org/devguide/patch.html#preparation
History
Date User Action Args
2012-07-22 21:17:51bethardsetrecipients: + bethard, Danh, wm, atfrase
2012-07-22 21:17:51bethardsetmessageid: <1342991871.46.0.860963829286.issue11354@psf.upfronthosting.co.za>
2012-07-22 21:17:50bethardlinkissue11354 messages
2012-07-22 21:17:50bethardcreate