Exemplo n.º 1
0
def _complete(invocation, collection=None):
    colstr = ""
    if collection:
        colstr = "-c {0}".format(collection)
    with expect_exit(0):
        _dispatch("inv --complete {1} -- inv {0}".format(invocation, colstr))
    return sys.stdout.getvalue()
Exemplo n.º 2
0
def _complete(invocation, collection=None):
    colstr = ""
    if collection:
        colstr = "-c {0}".format(collection)
    with expect_exit(0):
        _dispatch("inv --complete {1} -- inv {0}".format(invocation, colstr))
    return sys.stdout.getvalue()
Exemplo n.º 3
0
 def missing_default_task_prints_help(self):
     with expect_exit():
         _dispatch("inv -c foo")
     ok_("Core options:" in sys.stdout.getvalue())
Exemplo n.º 4
0
 def version_override(self):
     with expect_exit():
         _dispatch('notinvoke -V', version="nope 1.0")
     eq_(sys.stdout.getvalue(), "nope 1.0\n")
Exemplo n.º 5
0
 def missing_default_task_prints_help(self):
     with expect_exit():
         _dispatch("inv -c foo")
     ok_("Core options:" in sys.stdout.getvalue())
Exemplo n.º 6
0
 def version_override(self):
     with expect_exit():
         _dispatch('notinvoke -V', version="nope 1.0")
     eq_(sys.stdout.getvalue(), "nope 1.0\n")