summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsteven.bethard <devnull@localhost>2009-07-26 15:16:18 +0000
committersteven.bethard <devnull@localhost>2009-07-26 15:16:18 +0000
commitcffc1b330eb2293efba0b57bb0a3b56080283c75 (patch)
treee3b7ed63cb029324d5288676e0e5e3bf599c50c7 /test
parent25d79f58974cc14f475a4762926981e247c9f70c (diff)
downloadargparse-cffc1b330eb2293efba0b57bb0a3b56080283c75.tar.gz
Spaces now only signal a positional if the argument string doesn't start with an optional declared in the parser.
Diffstat (limited to 'test')
-rw-r--r--test/test_argparse.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test_argparse.py b/test/test_argparse.py
index 011b9b6..452933f 100644
--- a/test/test_argparse.py
+++ b/test/test_argparse.py
@@ -1117,7 +1117,7 @@ class TestEmptyAndSpaceContainingArguments(ParserTestCase):
argument_signatures = [
Sig('x', nargs='?'),
- Sig('-y'),
+ Sig('-y', '--yyy', dest='y'),
]
failures = ['-y']
successes = [
@@ -1127,6 +1127,8 @@ class TestEmptyAndSpaceContainingArguments(ParserTestCase):
(['-y', ''], NS(x=None, y='')),
(['-y', 'a badger'], NS(x=None, y='a badger')),
(['-y', '-a badger'], NS(x=None, y='-a badger')),
+ (['--yyy=a badger'], NS(x=None, y='a badger')),
+ (['--yyy=-a badger'], NS(x=None, y='-a badger')),
]