def test_delta_structured_data_tree_serialization(zipped_trees): old_tree = StructuredDataTree() new_tree = StructuredDataTree() old_filename, new_filename = zipped_trees old_tree.load_from(old_filename) new_tree.load_from(new_filename) _, __, ___, delta_tree = old_tree.compare_with(new_tree) new_delta_tree = StructuredDataTree() new_delta_tree.create_tree_from_raw_tree(delta_tree.get_raw_tree()) assert delta_tree.is_equal(new_delta_tree)
def test_delta_structured_data_tree_serialization(two_tree_filenames): old_tree = StructuredDataTree() new_tree = StructuredDataTree() old_filename, new_filename = two_tree_filenames old_tree.load_from(old_filename) new_tree.load_from(new_filename) _, __, ___, delta_tree = old_tree.compare_with(new_tree) raw_delta_tree = delta_tree.get_raw_tree() new_delta_tree = StructuredDataTree() new_delta_tree.create_tree_from_raw_tree(raw_delta_tree) new_raw_delta_tree = new_delta_tree.get_raw_tree() assert raw_delta_tree == new_raw_delta_tree