diff options
author | Doug Hellmann <doug.hellmann@dreamhost.com> | 2012-04-29 15:26:41 -0400 |
---|---|---|
committer | Doug Hellmann <doug.hellmann@dreamhost.com> | 2012-04-29 15:26:41 -0400 |
commit | 027ca037da952e9a4f7a1cd6ba5d92bc1ed1eea7 (patch) | |
tree | 7687648b141518ff6c198063e54ccc949f5384aa /tests | |
parent | 607d283d8809efee02c86b3a73e2d3b3227a6ffe (diff) | |
download | cliff-027ca037da952e9a4f7a1cd6ba5d92bc1ed1eea7.tar.gz |
100% coverage of cliff.command
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_command.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/test_command.py b/tests/test_command.py new file mode 100644 index 0000000..8b0d217 --- /dev/null +++ b/tests/test_command.py @@ -0,0 +1,22 @@ + +from cliff.command import Command + + +class TestCommand(Command): + """Description of command. + """ + + def run(self, parsed_args): + return + + +def test_get_description(): + cmd = TestCommand(None, None) + desc = cmd.get_description() + assert desc == "Description of command.\n " + + +def test_get_parser(): + cmd = TestCommand(None, None) + parser = cmd.get_parser('NAME') + assert parser.prog == 'NAME' |