diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-01-03 00:06:50 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-01-03 00:08:32 +0000 |
| commit | f127d6bbed76d3aab49e950ddabe637f63d1913a (patch) | |
| tree | 274a52ee4467ca04cf1463f9ac924dabe20920e8 /tests/docx/body_xml_tests.py | |
| parent | ff7cd85b0e97aae22f4f4d954327fd8ddd6b1abb (diff) | |
Ignore child nodes that aren't elements when reading children
Diffstat (limited to 'tests/docx/body_xml_tests.py')
| -rw-r--r-- | tests/docx/body_xml_tests.py | 8 |
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): |
