From 027ca037da952e9a4f7a1cd6ba5d92bc1ed1eea7 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Sun, 29 Apr 2012 15:26:41 -0400 Subject: 100% coverage of cliff.command --- tests/test_command.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/test_command.py 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' -- cgit v1.2.1