diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-09-26 17:12:04 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-09-26 17:12:04 -0400 |
commit | 32512dc80da639b621dcac26467c5b1e75db2af0 (patch) | |
tree | 3d0195970d451ede5fb91260cecc9f2b4df1ddc3 /tests | |
parent | 58ba2390dc823b95b8d97f67d518b4a50e22be89 (diff) | |
download | cmd2-git-32512dc80da639b621dcac26467c5b1e75db2af0.tar.gz |
Converted help to argparse
Diffstat (limited to 'tests')
-rw-r--r-- | tests/conftest.py | 2 | ||||
-rw-r--r-- | tests/test_argparse.py | 2 | ||||
-rw-r--r-- | tests/test_cmd2.py | 2 | ||||
-rw-r--r-- | tests/test_completion.py | 2 | ||||
-rw-r--r-- | tests/test_pyscript.py | 8 |
5 files changed, 8 insertions, 8 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index b6f8587f..4083c50e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -38,7 +38,7 @@ Documented commands (type help <topic>): ================================================================================ alias Manage aliases edit Edit a file in a text editor -help List available commands with "help" or detailed help with "help cmd" +help List available commands or provide detailed help for a specific command history View, run, edit, save, or clear previously entered commands load Run commands in script file that is encoded as either ASCII or UTF-8 text macro Manage macros diff --git a/tests/test_argparse.py b/tests/test_argparse.py index 0939859a..fdd16bcc 100644 --- a/tests/test_argparse.py +++ b/tests/test_argparse.py @@ -217,7 +217,7 @@ class SubcommandApp(cmd2.Cmd): func(self, args) else: # No subcommand was provided, so call help - self.do_help(['base']) + self.do_help('base') @pytest.fixture def subcommand_app(): diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index 1b31854a..8011ba30 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -1251,7 +1251,7 @@ diddly This command does diddly Other ================================================================================ alias Manage aliases -help List available commands with "help" or detailed help with "help cmd" +help List available commands or provide detailed help for a specific command history View, run, edit, save, or clear previously entered commands load Run commands in script file that is encoded as either ASCII or UTF-8 text macro Manage macros diff --git a/tests/test_completion.py b/tests/test_completion.py index 40299954..945f68ca 100644 --- a/tests/test_completion.py +++ b/tests/test_completion.py @@ -835,7 +835,7 @@ class SubcommandsWithUnknownExample(cmd2.Cmd): func(self, args) else: # No subcommand was provided, so call help - self.do_help(['base']) + self.do_help('base') @pytest.fixture diff --git a/tests/test_pyscript.py b/tests/test_pyscript.py index c7769c7a..36e48598 100644 --- a/tests/test_pyscript.py +++ b/tests/test_pyscript.py @@ -18,16 +18,16 @@ class PyscriptExample(Cmd): def _do_media_movies(self, args) -> None: if not args.command: - self.do_help(['media movies']) + self.do_help('media movies') else: self.poutput('media movies ' + str(args.__dict__)) def _do_media_shows(self, args) -> None: if not args.command: - self.do_help(['media shows']) + self.do_help('media shows') if not args.command: - self.do_help(['media shows']) + self.do_help('media shows') else: self.poutput('media shows ' + str(args.__dict__)) @@ -72,7 +72,7 @@ class PyscriptExample(Cmd): func(self, args) else: # No subcommand was provided, so call help - self.do_help(['media']) + self.do_help('media') foo_parser = argparse_completer.ACArgumentParser(prog='foo') foo_parser.add_argument('-c', dest='counter', action='count') |