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()
def missing_default_task_prints_help(self): with expect_exit(): _dispatch("inv -c foo") ok_("Core options:" in sys.stdout.getvalue())
def version_override(self): with expect_exit(): _dispatch('notinvoke -V', version="nope 1.0") eq_(sys.stdout.getvalue(), "nope 1.0\n")