Exemplo n.º 1
0
 def test_plain(self):
     todo.CONFIG["PLAIN"] = True
     self.addm_todo_with_pri(self.num)
     lines = todo.format_lines()
     self.assert_plain(lines, dict)
     lines = todo.format_lines(True)
     self.assert_plain(lines, list)
Exemplo n.º 2
0
 def test_plain(self):
     todo.CONFIG["PLAIN"] = True
     self.addm_todo_with_pri(self.num)
     lines = todo.format_lines()
     self.assert_plain(lines, dict)
     lines = todo.format_lines(True)
     self.assert_plain(lines, list)
Exemplo n.º 3
0
def rev_list():
    """List items in reverse order so for long lists, the most important stuff
    won't scroll off the top of the screen."""

    formatted = format_lines()
    lines = []
    for p in PRIORITIES[::-1]:
        lines.extend(formatted[p])

    if lines:
        print(concat(lines)[:-1])
    print_x_of_y(lines, lines)
Exemplo n.º 4
0
def rev_list():
    """List items in reverse order so for long lists, the most important stuff
    won't scroll off the top of the screen."""

    formatted = format_lines()
    lines = []
    for p in PRIORITIES[::-1]:
        lines.extend(formatted[p])

    if lines:
        print(concat(lines)[:-1])
    print_x_of_y(lines, lines)
Exemplo n.º 5
0
 def test_formatted_remove_pri(self):
     todo.CONFIG["NO_PRI"] = True
     self.addm_todo_with_pri(self.num)
     lines = todo.format_lines()
     self.assert_nopri(lines)
Exemplo n.º 6
0
 def test_color_only(self):
     self.addm_todo_with_pri(self.num)
     lines = todo.format_lines(True)
     self.assert_color_only(lines)
Exemplo n.º 7
0
 def test_formatted(self):
     self.addm_todo_with_pri(self.num)
     lines = todo.format_lines()
     self.assert_formatted(lines)
Exemplo n.º 8
0
 def test_formatted_remove_pri(self):
     todo.CONFIG["NO_PRI"] = True
     self.addm_todo_with_pri(self.num)
     lines = todo.format_lines()
     self.assert_nopri(lines)
Exemplo n.º 9
0
 def test_color_only(self):
     self.addm_todo_with_pri(self.num)
     lines = todo.format_lines(True)
     self.assert_color_only(lines)
Exemplo n.º 10
0
 def test_formatted(self):
     self.addm_todo_with_pri(self.num)
     lines = todo.format_lines()
     self.assert_formatted(lines)