def get_childs_depth1(self): """Test to retrieve all childs and their path on test_add_child_depth2_node_already_exist tree """ root = Node('A') root.add_leaf(['A', 'B', 'C'], 1) root.add_leaf(['A', 'B', 'D'], 2) childs = root.get_childs() childs.sort() assert childs == [(['A', 'B', 'C'], 1), (['A', 'B', 'C'], 2)]
def test_get_childs_depth2(self): """Test to retrieve all childs and their path on test_add_child_depth2 tree""" root = Node('A') root.add_leaf(['A', 'B', 'C'], 1) assert root.get_childs() == [(['A', 'B', 'C'], 1)]