Skip to content

Commit

Permalink
Failing test re #165
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Aug 27, 2014
1 parent 9fa31cf commit 32c9742
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from spec import eq_, skip, Spec, ok_, trap, raises
from mock import patch, Mock

from invoke.cli import parse
from invoke.cli import parse, tasks_from_contexts
from invoke.context import Context
from invoke.runner import run
from invoke.parser import Parser
Expand Down Expand Up @@ -313,7 +313,7 @@ def mytask(mystring, s, boolean=False, b=False, v=False,
@task(aliases=['mytask27'])
def mytask2():
pass
@task
@task(default=True)
def mytask3(mystring):
pass
@task
Expand Down Expand Up @@ -357,6 +357,11 @@ def subcollection_aliases(self):
def subcollection_default_tasks(self):
self._compare_names("sub", "sub.subtask")

def loaded_collection_default_task(self):
result = tasks_from_contexts(self._parse(''), self.c)
eq_(len(result), 1)
eq_(result[0][0], 'mytask3')

def boolean_args(self):
"mytask --boolean"
self._compare("--boolean", 'boolean', True)
Expand Down

0 comments on commit 32c9742

Please sign in to comment.