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])
def testNumberedRangeTodos(self): args = ["1", "2-4", "9", "before", "hello"] self.assertEqual(chaido.cleanUpArguments(args), [1, 2, 3, 4, 9, "before", "hello"])
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"])
def testCleanArgumentsNoOptions(self): arguments = ["buy", "more", "milk", "ok?"] cleanedArguments = chaido.cleanUpArguments(arguments) self.assertEqual(cleanedArguments, ["buy more milk ok?"])
def testCleanEmptyArguments(self): arguments = [] cleanedArguments = chaido.cleanUpArguments(arguments) self.assertEqual(cleanedArguments, [])
def testCleanArgumentsToAddTodo(self): arguments = ["buy", "more", "milk", "before", "5"] cleanedArguments = chaido.cleanUpArguments(arguments) self.assertEqual(cleanedArguments, ["buy more milk", "before", 5])
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])
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])