diff options
| author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-08-28 01:27:05 -0400 |
|---|---|---|
| committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-08-28 01:27:05 -0400 |
| commit | df703af969219665b7d672025bf9b26f75a76285 (patch) | |
| tree | 4843360faf9677cfb0c22d95f1ae0bd100561616 /tests_isolated | |
| parent | 6b5065e77715c6bab45f3a57eb5b97e3cbe4b86d (diff) | |
| parent | 36b0b75265942fe375545beb7d2d8a2c5f6f63c4 (diff) | |
| download | cmd2-git-df703af969219665b7d672025bf9b26f75a76285.tar.gz | |
Merge branch 'master' into 2.0
Diffstat (limited to 'tests_isolated')
| -rw-r--r-- | tests_isolated/test_commandset/test_commandset.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests_isolated/test_commandset/test_commandset.py b/tests_isolated/test_commandset/test_commandset.py index f32c9104..ea37e194 100644 --- a/tests_isolated/test_commandset/test_commandset.py +++ b/tests_isolated/test_commandset/test_commandset.py @@ -76,7 +76,7 @@ class CommandSetA(CommandSetBase): handler(args) # main -> sub - subcmd_parser = cmd2.Cmd2ArgumentParser(add_help=False, description="Sub Command") + subcmd_parser = cmd2.Cmd2ArgumentParser(description="Sub Command") @cmd2.as_subcommand_to('main', 'sub', subcmd_parser, help="sub command") def subcmd_func(self, args: argparse.Namespace) -> None: @@ -338,7 +338,7 @@ class LoadableBase(cmd2.CommandSet): self._cmd.pwarning('This command does nothing without sub-parsers registered') self._cmd.do_help('stir') - stir_pasta_parser = cmd2.Cmd2ArgumentParser('pasta', add_help=False) + stir_pasta_parser = cmd2.Cmd2ArgumentParser() stir_pasta_parser.add_argument('--option', '-o') stir_pasta_parser.add_subparsers(title='style', help='Stir style') @@ -378,7 +378,7 @@ class LoadableFruits(cmd2.CommandSet): def do_apple(self, _: cmd2.Statement): self._cmd.poutput('Apple') - banana_parser = cmd2.Cmd2ArgumentParser(add_help=False) + banana_parser = cmd2.Cmd2ArgumentParser() banana_parser.add_argument('direction', choices=['discs', 'lengthwise']) @cmd2.as_subcommand_to('cut', 'banana', banana_parser, help='Cut banana', aliases=['bananer']) @@ -392,7 +392,7 @@ class LoadablePastaStir(cmd2.CommandSet): super(LoadablePastaStir, self).__init__() self._dummy = dummy # prevents autoload - stir_pasta_vigor_parser = cmd2.Cmd2ArgumentParser('vigor', add_help=False) + stir_pasta_vigor_parser = cmd2.Cmd2ArgumentParser() stir_pasta_vigor_parser.add_argument('frequency') @cmd2.as_subcommand_to('stir pasta', 'vigorously', stir_pasta_vigor_parser) @@ -412,7 +412,7 @@ class LoadableVegetables(cmd2.CommandSet): def complete_style_arg(self, text: str, line: str, begidx: int, endidx: int) -> List[str]: return ['quartered', 'diced'] - bokchoy_parser = cmd2.Cmd2ArgumentParser(add_help=False) + bokchoy_parser = cmd2.Cmd2ArgumentParser() bokchoy_parser.add_argument('style', completer=complete_style_arg) @cmd2.as_subcommand_to('cut', 'bokchoy', bokchoy_parser) @@ -560,7 +560,7 @@ def test_nested_subcommands(command_sets_manual): super(BadNestedSubcommands, self).__init__() self._dummy = dummy # prevents autoload - stir_pasta_vigor_parser = cmd2.Cmd2ArgumentParser('vigor', add_help=False) + stir_pasta_vigor_parser = cmd2.Cmd2ArgumentParser() stir_pasta_vigor_parser.add_argument('frequency') # stir sauce doesn't exist anywhere, this should fail @@ -606,7 +606,7 @@ class AppWithSubCommands(cmd2.Cmd): self.poutput('This command does nothing without sub-parsers registered') self.do_help('cut') - banana_parser = cmd2.Cmd2ArgumentParser(add_help=False) + banana_parser = cmd2.Cmd2ArgumentParser() banana_parser.add_argument('direction', choices=['discs', 'lengthwise']) @cmd2.as_subcommand_to('cut', 'banana', banana_parser, help='Cut banana', aliases=['bananer']) @@ -617,7 +617,7 @@ class AppWithSubCommands(cmd2.Cmd): def complete_style_arg(self, text: str, line: str, begidx: int, endidx: int) -> List[str]: return ['quartered', 'diced'] - bokchoy_parser = cmd2.Cmd2ArgumentParser(add_help=False) + bokchoy_parser = cmd2.Cmd2ArgumentParser() bokchoy_parser.add_argument('style', completer=complete_style_arg) @cmd2.as_subcommand_to('cut', 'bokchoy', bokchoy_parser) @@ -860,7 +860,7 @@ def test_bad_subcommand(): """Cut something""" pass - banana_parser = cmd2.Cmd2ArgumentParser(add_help=False) + banana_parser = cmd2.Cmd2ArgumentParser() banana_parser.add_argument('direction', choices=['discs', 'lengthwise']) @cmd2.as_subcommand_to('cut', 'bad name', banana_parser, help='This should fail') |
