def setUp(self): ShellBaseTest.setUp(self) class TestSubOptions(Options): desc = """ short sub-command description string Long sub-command description string. """ usage = '[options]' opts = [ Opt('alpha', 'a', 'alpha help string', store=int), Opt('echo', 'e', 'echo help string', store=True), Opt('foxtrot', '', 'foxtrot help string', store=str) ] class TestOptions(Options): desc = """ short command description string Long command description string. """ usage = '[options]' cmds = { 'subcmd|sub-command':TestSubOptions } opts = [ Opt('alpha', 'a', 'alpha help string', store=True), Opt('bravo', 'b', 'bravo help string', store=int, metavar='INT'), Opt('charlie', '', 'charlie help string', store=True), Opt('delta', '', 'delta help string', store=str) ] self.ui = self.shell self.cmd = TestOptions(name='cmd', ui=self.ui)
def setUp(self): ShellBaseTest.setUp(self) class TestSubOptions(Options): desc = """ short sub-command description string Long sub-command description string. """ usage = '[options]' opts = [ Opt('alpha', 'a', 'alpha help string', store=int), Opt('echo', 'e', 'echo help string', store=True), Opt('foxtrot', '', 'foxtrot help string', store=str) ] class TestOptions(Options): desc = """ short command description string Long command description string. """ usage = '[options]' cmds = {'subcmd|sub-command': TestSubOptions} opts = [ Opt('alpha', 'a', 'alpha help string', store=True), Opt('bravo', 'b', 'bravo help string', store=int, metavar='INT'), Opt('charlie', '', 'charlie help string', store=True), Opt('delta', '', 'delta help string', store=str) ] self.ui = self.shell self.cmd = TestOptions(name='cmd', ui=self.ui)
def tearDown(self): ShellBaseTest.tearDown(self)