def test_get_root_returns_self_if_starting_at_root(self): root = Tree('root') found = root.get_root() self.assertEqual(found, root)
def test_get_root(self): root = Tree('root') child = Tree('a') root.add_child(child) found = child.get_root() self.assertEqual(found, root)