def it_can_diff_a_named_item_between_two_packages( self, package_, package_2_, DiffPresenter_, pkg_item_, pkg_item_2_): # exercise --------------------- DiffPresenter.named_item_diff(package_, package_2_, URI_TAIL) # verify ----------------------- package_.find_item_by_uri_tail.assert_called_once_with(URI_TAIL) package_2_.find_item_by_uri_tail.assert_called_once_with(URI_TAIL) DiffPresenter_._pkg_item_diff.assert_called_once_with( pkg_item_, pkg_item_2_)
def it_can_diff_a_named_item_between_two_packages(self, package_, package_2_, DiffPresenter_, pkg_item_, pkg_item_2_): # exercise --------------------- DiffPresenter.named_item_diff(package_, package_2_, URI_TAIL) # verify ----------------------- package_.find_item_by_uri_tail.assert_called_once_with(URI_TAIL) package_2_.find_item_by_uri_tail.assert_called_once_with(URI_TAIL) DiffPresenter_._pkg_item_diff.assert_called_once_with( pkg_item_, pkg_item_2_)
def diff_item(self, package_1_path, package_2_path, uri_tail): """ Display the meaningful differences between the item identified by *uri_tail* in the package at *package_1_path* and its counterpart in the package at *package_2_path*. Each path can be either a standard zip package (e.g. a .pptx file) or a directory containing an extracted package. """ package_1 = Package.read(package_1_path) package_2 = Package.read(package_2_path) diff = DiffPresenter.named_item_diff(package_1, package_2, uri_tail) OpcView.item_diff(diff)
def diff_item(self, package_1_path, package_2_path, uri_tail): """ Display the meaningful differences between the item identified by *uri_tail* in the package at *package_1_path* and its counterpart in the package at *package_2_path*. Each path can be either a standard zip package (e.g. a .pptx file) or a directory containing an extracted package. """ package_1 = Package.read(package_1_path) package_2 = Package.read(package_2_path) diff = DiffPresenter.named_item_diff(package_1, package_2, uri_tail) OpcView.item_diff(diff)
def diff_pkg(self, package_1_path, package_2_path): """ Display the meaningful differences between the packages at *package_1_path* and *package_2_path*. Each path can be either a standard zip package (e.g. .pptx file) or a directory containing an extracted package. """ package_1 = Package.read(package_1_path) package_2 = Package.read(package_2_path) content_types_diff = DiffPresenter.named_item_diff( package_1, package_2, _CONTENT_TYPES_URI) rels_diffs = DiffPresenter.rels_diffs(package_1, package_2) xml_part_diffs = DiffPresenter.xml_part_diffs(package_1, package_2) OpcView.package_diff(content_types_diff, rels_diffs, xml_part_diffs)
def diff_pkg(self, package_1_path, package_2_path): """ Display the meaningful differences between the packages at *package_1_path* and *package_2_path*. Each path can be either a standard zip package (e.g. .pptx file) or a directory containing an extracted package. """ package_1 = Package.read(package_1_path) package_2 = Package.read(package_2_path) content_types_diff = DiffPresenter.named_item_diff( package_1, package_2, _CONTENT_TYPES_URI) rels_diffs = DiffPresenter.rels_diffs(package_1, package_2) xml_part_diffs = DiffPresenter.xml_part_diffs(package_1, package_2) OpcView.package_diff(content_types_diff, rels_diffs, xml_part_diffs)