Exemplo n.º 1
0
 def it_can_gather_xml_part_diffs_between_two_packages(
         self, package_, package_2_, DiffPresenter_, xml_parts_,
         pkg_item_diffs_):
     # exercise ---------------------
     xml_part_diffs = DiffPresenter.xml_part_diffs(package_, package_2_)
     # verify -----------------------
     DiffPresenter_._pkg_item_diffs.assert_called_once_with(
         xml_parts_, package_2_)
     assert xml_part_diffs is pkg_item_diffs_
Exemplo n.º 2
0
 def it_can_gather_xml_part_diffs_between_two_packages(
         self, package_, package_2_, DiffPresenter_, xml_parts_,
         pkg_item_diffs_):
     # exercise ---------------------
     xml_part_diffs = DiffPresenter.xml_part_diffs(package_, package_2_)
     # verify -----------------------
     DiffPresenter_._pkg_item_diffs.assert_called_once_with(
         xml_parts_, package_2_)
     assert xml_part_diffs is pkg_item_diffs_
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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)