Exemplo n.º 1
0
   def test_yield_descendants(self):
       todos = Todos("""a
tb
t\tc
t\tc
t\tx
t\t\td""")
       self.assertTodos(todos.yield_descendants(), str(todos))
       self.assertTodos(todos.subitems[0].yield_descendants(), """\tb
t\tc
t\tc
t\tx
t\t\td""")
       self.assertTodos(todos.subitems[0].subitems[0].yield_descendants(), """\t\tc
t\tc
t\tx
t\t\td""")
Exemplo n.º 2
0
   def test_yield_descendants(self):
       todos = Todos("""a
tb
t\tc
t\tc
t\tx
t\t\td""")
       self.assertTodos(todos.yield_descendants(), str(todos))
       self.assertTodos(todos.subitems[0].yield_descendants(), """\tb
t\tc
t\tc
t\tx
t\t\td""")
       self.assertTodos(todos.subitems[0].subitems[0].yield_descendants(),
                        """\t\tc
t\tc
t\tx
t\t\td""")