Esempio n. 1
0
    def test_deprioritize(self):
        todo.addm_todo("\n".join(self._test_lines_pri(self.num)))

        for i in range(0, self.num):
            todo.de_prioritize_todo(str(i + 1))

        self.assertNumLines(self.num, "Test\s\d+")

        for i in range(0, self.num):
            todo.de_prioritize_todo(str(i + 1))

        self.assertNumLines(self.num, "Test\s\d+")
Esempio n. 2
0
    def test_deprioritize(self):
        todo.addm_todo("\n".join(self._test_lines_pri(self.num)))

        for i in range(0, self.num):
            todo.de_prioritize_todo(str(i + 1))

        self.assertNumLines(self.num, "Test\s\d+")

        for i in range(0, self.num):
            todo.de_prioritize_todo(str(i + 1))

        self.assertNumLines(self.num, "Test\s\d+")
Esempio n. 3
0
    def test_prioritize(self):
        todo.addm_todo("\n".join(self._test_lines_no_pri(self.num)))

        n = len(todo.PRIORITIES)
        for i in range(0, self.num):
            todo.prioritize_todo([str(i + 1), todo.PRIORITIES[i % n]])

        self.assertNumLines(self.num, "\([A-X]\)\sTest\s\d+")

        for i in range(0, self.num):
            todo.prioritize_todo([str(i + 1), todo.PRIORITIES[-i % n]])

        self.assertNumLines(self.num, "\([A-X]\)\sTest\s\d+")

        for i in range(0, self.num):
            todo.de_prioritize_todo(str(i + 1))

        self.assertNumLines(0, "\([A-X]\)\sTest\s\d+")

        for i in range(0, self.num):
            todo.prioritize_todo([str(i + 1), todo.PRIORITIES[-i % n]])

        self.assertNumLines(self.num, "\([A-X]\)\sTest\s\d+")
Esempio n. 4
0
    def test_prioritize(self):
        todo.addm_todo("\n".join(self._test_lines_no_pri(self.num)))

        n = len(todo.PRIORITIES)
        for i in range(0, self.num):
            todo.prioritize_todo([str(i + 1), todo.PRIORITIES[i % n]])

        self.assertNumLines(self.num, "\([A-X]\)\sTest\s\d+")

        for i in range(0, self.num):
            todo.prioritize_todo([str(i + 1), todo.PRIORITIES[-i % n]])

        self.assertNumLines(self.num, "\([A-X]\)\sTest\s\d+")

        for i in range(0, self.num):
            todo.de_prioritize_todo(str(i + 1))

        self.assertNumLines(0, "\([A-X]\)\sTest\s\d+")

        for i in range(0, self.num):
            todo.prioritize_todo([str(i + 1), todo.PRIORITIES[-i % n]])

        self.assertNumLines(self.num, "\([A-X]\)\sTest\s\d+")