From 0204b943b1a4daaf102ec53b59cd491d9dc3984f Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 18 Feb 2024 10:53:54 +0000 Subject: [PATCH] Remove unnecessary test class --- tests/docx/document_xml_tests.py | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/docx/document_xml_tests.py b/tests/docx/document_xml_tests.py index e93392c5..a0441546 100644 --- a/tests/docx/document_xml_tests.py +++ b/tests/docx/document_xml_tests.py @@ -5,24 +5,24 @@ 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):