Пример #1
0
 def test_get_root_returns_self_if_starting_at_root(self):
     root = Tree('root')
     found = root.get_root()
     self.assertEqual(found, root)
Пример #2
0
 def test_get_root(self):
     root = Tree('root')
     child = Tree('a')
     root.add_child(child)
     found = child.get_root()
     self.assertEqual(found, root)