Commit af2b3cf4 authored by Jacek Sowiński's avatar Jacek Sowiński

Add new tests to increase lib coverage

parent 34db612b
...@@ -300,6 +300,20 @@ class ListCommandTest(CommandTest): ...@@ -300,6 +300,20 @@ class ListCommandTest(CommandTest):
self.assertEquals(self.output, "|t5c| (C) 2015-11-05 Foo @Context2 Not@Context +Project1 Not+Project\n") self.assertEquals(self.output, "|t5c| (C) 2015-11-05 Foo @Context2 Not@Context +Project1 Not+Project\n")
self.assertEquals(self.errors, "") self.assertEquals(self.errors, "")
def test_list40(self):
command = ListCommand(["(<C)"], self.todolist, self.out, self.error)
command.execute()
self.assertEquals(self.output, "| 2| (D) Bar @Context1 +Project2\n")
self.assertEquals(self.errors, "")
def test_list41(self):
command = ListCommand(["-z", "Zzz"], self.todolist, self.out, self.error)
command.execute()
self.assertEquals(self.output, "")
self.assertEquals(self.errors, "option -z not recognized\n")
def test_help(self): def test_help(self):
command = ListCommand(["help"], self.todolist, self.out, self.error) command = ListCommand(["help"], self.todolist, self.out, self.error)
command.execute() command.execute()
......
...@@ -106,14 +106,14 @@ class MultiCommand(ExpressionCommand): ...@@ -106,14 +106,14 @@ class MultiCommand(ExpressionCommand):
Operations specific for particular command dealing with multiple todo Operations specific for particular command dealing with multiple todo
IDs. IDs.
""" """
pass raise NotImplementedError
def _execute_not_multi(self): def _execute_not_multi(self):
""" """
Some commands can do something else besides operating on multiple todo Some commands can do something else besides operating on multiple todo
IDs. This method is a wrapper for those other operations. IDs. This method is a wrapper for those other operations.
""" """
pass raise NotImplementedError
def execute(self): def execute(self):
if not super(MultiCommand, self).execute(): if not super(MultiCommand, self).execute():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment