def test_supercommand(self): @clize def fn1(): pass @clize def fn2(): pass subcommands, supercommand = read_supercommand( (fn1, fn2), "Description", "Footnotes", ('help', 'h') ) self.assertEqual( help('group', supercommand, do_print=False), """\ Usage: group command [OPTIONS] Description Available commands: fn1 fn2 See 'group command --help' for more information on a specific command. Footnotes """ )
def test_supercommand(self): @clize def fn1(): pass @clize def fn2(): pass subcommands, supercommand = read_supercommand( (fn1, fn2), "Description", "Footnotes", ('help', 'h') ) self.assertEqual( help('group', supercommand, do_print=False), """\ Usage: group command [OPTIONS] Description Available commands: fn2 fn1 See 'group command --help' for more information on a specific command. Footnotes """ )
def assertHelpEquals( self, fn, help_str, alias={}, force_positional=(), require_excess=False, coerce={} ): return self.assertEqual( help('fn', read_arguments(fn, alias, force_positional, require_excess, coerce)[0], do_print=False), help_str )