diff options
author | Eric Lin <anselor@gmail.com> | 2020-08-04 13:46:48 -0400 |
---|---|---|
committer | anselor <anselor@gmail.com> | 2020-08-04 15:24:53 -0400 |
commit | 1a82b37b6c23490b1d9127095e3ee4f2db21a85b (patch) | |
tree | eb45b08c177ec9d032436af5d158a0ad065dc967 /tests/test_transcript.py | |
parent | c983abaa881a3ac6110a90194def660489b2d5cc (diff) | |
download | cmd2-git-1a82b37b6c23490b1d9127095e3ee4f2db21a85b.tar.gz |
Marked with_arparser_and_unknown_args deprecated and consolidated
implementation as an option to with_argparser instead.
Diffstat (limited to 'tests/test_transcript.py')
-rw-r--r-- | tests/test_transcript.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py index 69389b7f..55d60e18 100644 --- a/tests/test_transcript.py +++ b/tests/test_transcript.py @@ -41,7 +41,7 @@ class CmdLineApp(cmd2.Cmd): speak_parser.add_argument('-s', '--shout', action="store_true", help="N00B EMULATION MODE") speak_parser.add_argument('-r', '--repeat', type=int, help="output [n] times") - @cmd2.with_argparser_and_unknown_args(speak_parser) + @cmd2.with_argparser(speak_parser, with_unknown_args=True) def do_speak(self, opts, arg): """Repeats what you tell me to.""" arg = ' '.join(arg) @@ -61,7 +61,8 @@ class CmdLineApp(cmd2.Cmd): mumble_parser = argparse.ArgumentParser() mumble_parser.add_argument('-r', '--repeat', type=int, help="output [n] times") - @cmd2.with_argparser_and_unknown_args(mumble_parser) + + @cmd2.with_argparser(mumble_parser, with_unknown_args=True) def do_mumble(self, opts, arg): """Mumbles what you tell me to.""" repetitions = opts.repeat or 1 |