aboutsummaryrefslogtreecommitdiff
path: root/tests/docx
diff options
context:
space:
mode:
Diffstat (limited to 'tests/docx')
-rw-r--r--tests/docx/body_xml_tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/docx/body_xml_tests.py b/tests/docx/body_xml_tests.py
index d0288bd..ddfa9b2 100644
--- a/tests/docx/body_xml_tests.py
+++ b/tests/docx/body_xml_tests.py
@@ -516,6 +516,14 @@ class ReadXmlElementTests(object):
])
result = _read_and_get_document_xml_element(element)
assert_equal("second", result[0].style_id)
+
+ @istest
+ def text_nodes_are_ignored_when_reading_children(self):
+ element = xml_element("w:r", {}, [xml_text("[text]")])
+ assert_equal(
+ documents.run([]),
+ _read_and_get_document_xml_element(element)
+ )
def _read_and_get_document_xml_element(*args, **kwargs):