diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-01-20 16:48:52 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-01-20 16:48:52 -0500 |
commit | 5550ab73a91d2834e6bda72eb3889998ad59be51 (patch) | |
tree | 12b387896ea91720416639daf8b10f8d66406dda /examples/subcommands.py | |
parent | 29ef26875664dfa3d70273b321092a83a68d9966 (diff) | |
download | cmd2-git-5550ab73a91d2834e6bda72eb3889998ad59be51.tar.gz |
Added unit tests for sub-commands
Diffstat (limited to 'examples/subcommands.py')
-rwxr-xr-x | examples/subcommands.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/subcommands.py b/examples/subcommands.py index eaadbb64..67b06e18 100755 --- a/examples/subcommands.py +++ b/examples/subcommands.py @@ -21,11 +21,11 @@ class SubcommandsExample(cmd2.Cmd): # sub-command functions for the base command def foo(self, args): """foo subcommand of base command""" - print(args.x * args.y) + self.poutput(args.x * args.y) def bar(self, args): """bar sucommand of base command""" - print('((%s))' % args.z) + self.poutput('((%s))' % args.z) # create the top-level parser for the base command base_parser = argparse.ArgumentParser(prog='base') |