Skip to content

Commit

Permalink
Some failing tests re #167
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Aug 26, 2014
1 parent 7c579d9 commit d8bf0ed
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/parser/parser.py
Expand Up @@ -327,6 +327,19 @@ def ambiguity_with_task_name(self):
p = Parser([c1, c2])
self._test_for_ambiguity("--foo othertask", p)

class task_repetition:
def is_happy_to_handle_same_task_multiple_times(self):
task1 = Context('mytask')
result = Parser((task1,)).parse_argv(['mytask', 'mytask'])
eq_(len(result), 2)
[eq_(x.name, 'mytask') for x in result]

def task_args_work_correctly(self):
task1 = Context('mytask', args=(Argument('meh'),))
result = Parser((task1,)).parse_argv(['mytask', '--meh', 'mehval1', 'mytask', '--meh', 'mehval2'])
eq_(result[0].args.meh.value, 'mehval1')
eq_(result[1].args.meh.value, 'mehval2')


class ParseResult_(Spec):
"ParseResult"
Expand Down

0 comments on commit d8bf0ed

Please sign in to comment.