Index: Lib/test/test_argparse.py =================================================================== --- Lib/test/test_argparse.py (revision 83538) +++ Lib/test/test_argparse.py (working copy) @@ -1187,7 +1187,17 @@ ('a -x b', NS(x=['b'], y=['a'])), ] +class TestPositionalArgAfterNargsOneOrMore(ParserTestCase): + """Tests specifying a positional that follows an arg with nargs=+""" + argument_signatures = [Sig('-x', nargs='+'), Sig('y')] + failures = ['', '-x'] + successes = [ + ('-x foo bar', NS(x=['foo',], y='bar')), + ('-x foo bar baz', NS(x=['foo', 'bar'], y='baz')), + ('-x foo bar baz buzz', NS(x=['foo', 'bar', 'baz'], y='buzz')), + ] + class TestNargsRemainder(ParserTestCase): """Tests specifying a positional with nargs=REMAINDER"""