Ejemplo n.º 1
0
 def testNumberedTodos(self):
     args = [
         "1", "2", "3", "4", "5", "Go", "to", "the", "shops", "6", "before",
         "7", "8", "9"
     ]
     self.assertEqual(
         chaido.cleanUpArguments(args),
         [1, 2, 3, 4, 5, "Go to the shops", 6, "before", 7, 8, 9])
Ejemplo n.º 2
0
 def testNumberedRangeTodos(self):
     args = ["1", "2-4", "9", "before", "hello"]
     self.assertEqual(chaido.cleanUpArguments(args),
                      [1, 2, 3, 4, 9, "before", "hello"])
Ejemplo n.º 3
0
 def testMultiWordTodo(self):
     args = ["Go", "to", "the", "shops", "before", "buy", "some", "milk"]
     self.assertEqual(chaido.cleanUpArguments(args),
                      ["Go to the shops", "before", "buy some milk"])
Ejemplo n.º 4
0
 def testCleanArgumentsNoOptions(self):
     arguments = ["buy", "more", "milk", "ok?"]
     cleanedArguments = chaido.cleanUpArguments(arguments)
     self.assertEqual(cleanedArguments, ["buy more milk ok?"])
Ejemplo n.º 5
0
 def testCleanEmptyArguments(self):
     arguments = []
     cleanedArguments = chaido.cleanUpArguments(arguments)
     self.assertEqual(cleanedArguments, [])
Ejemplo n.º 6
0
 def testCleanArgumentsToAddTodo(self):
     arguments = ["buy", "more", "milk", "before", "5"]
     cleanedArguments = chaido.cleanUpArguments(arguments)
     self.assertEqual(cleanedArguments, ["buy more milk", "before", 5])
Ejemplo n.º 7
0
 def testCleanArgumentsWithATodoAndMultipleOptions(self):
     arguments = ["buy", "more", "milk", "before", "5", "3", "9"]
     cleanedArguments = chaido.cleanUpArguments(arguments)
     self.assertEqual(cleanedArguments,
                      ["buy more milk", "before", 5, 3, 9])
Ejemplo n.º 8
0
 def testNumberedTodos(self):
     args = ["1", "2", "3", "4", "5", "Go", "to", "the", "shops", "6", "before", "7", "8", "9"]
     self.assertEqual(chaido.cleanUpArguments(args), [1, 2, 3, 4, 5, "Go to the shops", 6, "before", 7, 8, 9])
Ejemplo n.º 9
0
 def testNumberedRangeTodos(self):
     args = ["1", "2-4", "9", "before", "hello"]
     self.assertEqual(chaido.cleanUpArguments(args), [1, 2, 3, 4, 9, "before", "hello"])
Ejemplo n.º 10
0
 def testMultiWordTodo(self):
     args = ["Go", "to", "the", "shops", "before", "buy", "some", "milk"]
     self.assertEqual(chaido.cleanUpArguments(args), ["Go to the shops", "before", "buy some milk"])
Ejemplo n.º 11
0
 def testCleanEmptyArguments(self):
     arguments = []
     cleanedArguments = chaido.cleanUpArguments(arguments)
     self.assertEqual(cleanedArguments, [])
Ejemplo n.º 12
0
 def testCleanArgumentsNoOptions(self):
     arguments = ["buy", "more", "milk", "ok?"]
     cleanedArguments = chaido.cleanUpArguments(arguments)
     self.assertEqual(cleanedArguments, ["buy more milk ok?"])
Ejemplo n.º 13
0
 def testCleanArgumentsWithATodoAndMultipleOptions(self):
     arguments = ["buy", "more", "milk", "before", "5", "3", "9"]
     cleanedArguments = chaido.cleanUpArguments(arguments)
     self.assertEqual(cleanedArguments, ["buy more milk", "before", 5, 3, 9])
Ejemplo n.º 14
0
 def testCleanArgumentsToAddTodo(self):
     arguments = ["buy", "more", "milk", "before", "5"]
     cleanedArguments = chaido.cleanUpArguments(arguments)
     self.assertEqual(cleanedArguments, ["buy more milk", "before", 5])