diff options
| author | Michael Williamson <mike@zwobble.org> | 2024-02-18 10:53:54 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2024-02-18 10:53:54 +0000 |
| commit | 0204b943b1a4daaf102ec53b59cd491d9dc3984f (patch) | |
| tree | 34bbbb80a3f8ec16225434e5bc065e1c505a5de4 /tests/docx/document_xml_tests.py | |
| parent | 5f9c83b001a883231e56899c7306994466eb7648 (diff) | |
Remove unnecessary test class
Diffstat (limited to 'tests/docx/document_xml_tests.py')
| -rw-r--r-- | tests/docx/document_xml_tests.py | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/docx/document_xml_tests.py b/tests/docx/document_xml_tests.py index e93392c..a044154 100644 --- a/tests/docx/document_xml_tests.py +++ b/tests/docx/document_xml_tests.py @@ -5,24 +5,24 @@ from mammoth.docx import body_xml from ..testing import assert_equal -class ReadXmlElementTests(object): - def test_can_read_text_within_document(self): - element = _document_element_with_text("Hello!") - assert_equal( - documents.document([documents.paragraph([documents.run([documents.Text("Hello!")])])]), - _read_and_get_document_xml_element(element) - ) - - def test_footnotes_of_document_are_read(self): - notes = [documents.note("footnote", "4", [documents.paragraph([])])] - - body_xml = xml_element("w:body") - document_xml = xml_element("w:document", {}, [body_xml]) - - document = _read_and_get_document_xml_element(document_xml, notes=notes) - footnote = document.notes.find_note("footnote", "4") - assert_equal("4", footnote.note_id) - assert isinstance(footnote.body[0], documents.Paragraph) +def test_can_read_text_within_document(): + element = _document_element_with_text("Hello!") + assert_equal( + documents.document([documents.paragraph([documents.run([documents.Text("Hello!")])])]), + _read_and_get_document_xml_element(element) + ) + + +def test_footnotes_of_document_are_read(): + notes = [documents.note("footnote", "4", [documents.paragraph([])])] + + body_xml = xml_element("w:body") + document_xml = xml_element("w:document", {}, [body_xml]) + + document = _read_and_get_document_xml_element(document_xml, notes=notes) + footnote = document.notes.find_note("footnote", "4") + assert_equal("4", footnote.note_id) + assert isinstance(footnote.body[0], documents.Paragraph) def _read_and_get_document_xml_element(*args, **kwargs): |
