diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-05 00:51:42 -0500 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-05 00:51:42 -0500 |
commit | b79cc6921d9e0c2adf9f4524979411bafdec7dc5 (patch) | |
tree | 98d0705f3bf63e37d87374341ba73d1736c273bf /tests/test_argparse.py | |
parent | 04eac4bc45d5c811e2d54113a03f1ee546901e06 (diff) | |
download | cmd2-git-b79cc6921d9e0c2adf9f4524979411bafdec7dc5.tar.gz |
Added a shlex.split() wrapper to have a common way of calling it.
Replaced parse_quoted_string with _get_command_arg_list.
Diffstat (limited to 'tests/test_argparse.py')
-rw-r--r-- | tests/test_argparse.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/test_argparse.py b/tests/test_argparse.py index f5948f03..74a03e28 100644 --- a/tests/test_argparse.py +++ b/tests/test_argparse.py @@ -72,14 +72,6 @@ class ArgparseApp(cmd2.Cmd): def do_preservelist(self, arglist): self.stdout.write('{}'.format(arglist)) - @cmd2.with_argument_list - @cmd2.with_argument_list - def do_arglisttwice(self, arglist): - if isinstance(arglist, list): - self.stdout.write(' '.join(arglist)) - else: - self.stdout.write('False') - known_parser = argparse.ArgumentParser() known_parser.add_argument('-p', '--piglatin', action='store_true', help='atinLay') known_parser.add_argument('-s', '--shout', action='store_true', help='N00B EMULATION MODE') @@ -178,10 +170,6 @@ def test_preservelist(argparse_app): out = run_cmd(argparse_app, 'preservelist foo "bar baz"') assert out[0] == "['foo', '\"bar baz\"']" -def test_arglist_decorator_twice(argparse_app): - out = run_cmd(argparse_app, 'arglisttwice "we should" get these') - assert out[0] == 'we should get these' - class SubcommandApp(cmd2.Cmd): """ Example cmd2 application where we a base command which has a couple sub-commands.""" |