def test_nofile(self): os.unlink(todo.CONFIG["TODO_FILE"]) colored, sorted = todo._list_("pri", None)
def test_context(self): todo.addm_todo("\n".join(self._test_lines_context(self.num))) colored, sorted = todo._list_("context", "@(\w+)") self.assert_not_equal(colored, sorted) self.assert_labeled(colored, sorted)
def test_project(self): todo.addm_todo("\n".join(self._test_lines_project(self.num))) colored, sorted = todo._list_("project", "\+(\w+)") self.assert_not_equal(colored, sorted) self.assert_labeled(colored, sorted)
def test_dated(self): todo.addm_todo("\n".join(self._test_lines_date(self.num))) colored, sorted = todo._list_("date", "#\{(\d{4})-(\d{1,2})-(\d{1,2})\}") self.assert_not_equal(colored, sorted) self.assert_dated(colored, sorted)