diff -r 39b9b05c3085 Lib/test/test_argparse.py --- a/Lib/test/test_argparse.py Wed Apr 10 00:27:23 2013 +0200 +++ b/Lib/test/test_argparse.py Fri Apr 19 09:28:58 2013 +0200 @@ -260,13 +260,14 @@ """Test an Optional with a single-dash option string""" argument_signatures = [Sig('-x')] - failures = ['-x', 'a', '--foo', '-x --foo', '-x -y'] + failures = ['-x', 'a', '--foo', '-x --foo', '-x -y', '-x -- bar'] successes = [ ('', NS(x=None)), ('-x a', NS(x='a')), ('-xa', NS(x='a')), ('-x -1', NS(x='-1')), ('-x-1', NS(x='-1')), + ('-x--', NS(x='--')), ] @@ -359,13 +360,15 @@ """Test an Optional with a double-dash option string""" argument_signatures = [Sig('--foo')] - failures = ['--foo', '-f', '-f a', 'a', '--foo -x', '--foo --bar'] + failures = ['--foo', '-f', '-f a', 'a', '--foo -x', '--foo --bar', + '--foo -- bar'] successes = [ ('', NS(foo=None)), ('--foo a', NS(foo='a')), ('--foo=a', NS(foo='a')), ('--foo -2.5', NS(foo='-2.5')), ('--foo=-2.5', NS(foo='-2.5')), + ('--foo=--', NS(foo='--')), ]