New paste Repaste Download
    def test_addition_to_docx():
        import aspose.words as aw
    
        doc = aw.Document()
        builder = aw.DocumentBuilder(doc)
    
        builder.writeln("This is paragraph 1.")
        para1 = doc.first_section.body.last_paragraph
    
        builder.list_format.apply_number_default()
        builder.writeln("This is a list item.")
        para2 = doc.first_section.body.last_paragraph
        builder.list_format.remove_numbers()
    
        builder.writeln("This is paragraph 3.")
        para3 = doc.first_section.body.last_paragraph
    
        initial_count = doc.first_section.body.paragraphs.count
    
        addition_list = [
            (para1, "Added text after paragraph 1"),
            (para2, "Added text after list item"),
            (para3, "Added text after paragraph 3")
        ]
    
        result_doc = addition_to_docx(doc, addition_list)
    
        assert result_doc == doc
        assert doc.first_section.body.paragraphs.count == initial_count + 3
    
        new_para1 = para1.next_sibling
>       assert "Added text after paragraph 1" in new_para1.to_string()
E       TypeError: ["function missing required argument 'save_format' (pos 1)", "function missing required argument 'save_options' (pos 1)"]
test_redline_docx.py:166: TypeError
Filename: None. Size: 1kb. View raw, , hex, or download this file.

This paste expires on 2025-02-26 11:57:01.106773. Pasted through deprecated-web.