def test_restarts_numbering_for_all_elements_of_same_sequence(): doc = FixtureDocument("numbering_with_paragraphs_in_between.docx") composed = ComposedDocument( "numbering_with_paragraphs_in_between.docx", "numbering_with_paragraphs_in_between.docx") assert composed == doc
def test_styles_are_not_switched_for_first_numbering_element(): doc = FixtureDocument("switched_listing_style.docx") composed = ComposedDocument( "master_switched_listing_style.docx", "switched_listing_style.docx") assert composed == doc
def test_merged_styles_en(): doc = FixtureDocument("styles_en.docx") composed = ComposedDocument( "styles_en.docx", "styles_de.docx") assert composed == doc
def test_footnote(): doc = FixtureDocument("footnote.docx") composed = ComposedDocument("master.docx", "footnote.docx") assert composed == doc
def test_renumbering_of_non_visual_properties(): expected = FixtureDocument("renumbering_nv_props.docx") composed = ComposedDocument("header_with_image.docx", "image.docx") assert composed == expected
def test_section_types_are_correct(): composed = ComposedDocument("continous_section_break.docx", "continous_section_break.docx") assert [s.start_type for s in composed.doc.sections] == [2, 0, 0]
def test_next_page_section_break(): doc = FixtureDocument("next_page_section_break.docx") composed = ComposedDocument("next_page_section_break.docx", "legacy_empty.docx") assert composed == doc
def test_images(): doc = FixtureDocument("images.docx") composed = ComposedDocument("master.docx", "images.docx") assert composed == doc
def test_numberings_styles(): doc = FixtureDocument("numberings_styles.docx") composed = ComposedDocument("numberings_styles.docx", "numberings_styles.docx") assert composed == doc
def test_restart_numberings(): doc = FixtureDocument("numberings_restart.docx") composed = ComposedDocument("numberings_restart.docx", "numberings_restart.docx") assert composed == doc
def test_numberings(static_reseed): doc = FixtureDocument("numberings.docx") composed = ComposedDocument("numberings.docx", "numberings.docx") assert composed == doc
def test_hyperlinks(): doc = FixtureDocument("embedded_excel_chart.docx") composed = ComposedDocument("master.docx", "embedded_excel_chart.docx") assert composed == doc
def test_restart_numbering_manages_shared_style_names(static_reseed): doc = FixtureDocument("common_stylename_different_id.docx") composed = ComposedDocument("common_stylename_different_id1.docx", "common_stylename_different_id2.docx") assert composed == doc
def test_smartart(): doc = FixtureDocument("smart_art.docx") composed = ComposedDocument("master.docx", "smart_art.docx") assert composed == doc
def test_numbering_reference_to_numbering_zero(): doc = FixtureDocument("numbering_reference_to_numbering_zero.docx") composed = ComposedDocument("numbering_reference_to_numbering_zero.docx", "numbering_reference_to_numbering_zero.docx") assert composed == doc
def test_hyperlinks(): doc = FixtureDocument("hyperlinks.docx") composed = ComposedDocument("master.docx", "hyperlinks.docx") assert composed == doc
def test_preserves_list_styles_when_restarting_nested_numberings(): doc = FixtureDocument("broken_listing_nested.docx") composed = ComposedDocument("broken_listing_master.docx", "broken_listing_nested.docx") assert composed == doc
def test_continuous_odd_section_break(): doc = FixtureDocument("continous_odd_section_break.docx") composed = ComposedDocument("continous_section_break.docx", "odd_section_break.docx") assert composed == doc
def test_header_footer_sections(): doc = FixtureDocument("header_footer_sections.docx") composed = ComposedDocument("header_footer_sections.docx", "header_footer_sections.docx") assert composed == doc
def test_next_page_section_break_in_otherwise_empty_file_preseved(): doc = FixtureDocument("next_page_section_break_empty.docx") composed = ComposedDocument("master.docx", "next_page_section_break_empty.docx") assert composed == doc
def test_footnotes_with_hyperlinks(): doc = FixtureDocument("footnotes_with_hyperlinks.docx") composed = ComposedDocument("master.docx", "footnotes_with_hyperlinks.docx") assert composed == doc
def test_shapes(): doc = FixtureDocument("embedded_visio.docx") composed = ComposedDocument("master.docx", "embedded_visio.docx") assert composed == doc
def test_embedded_and_external_image(): doc = FixtureDocument("embedded_and_external_image.docx") composed = ComposedDocument("master.docx", "embedded_and_external_image.docx") assert composed == doc