From dd055e1396bba2177ada8ac4b05d7e87ccc8b780 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 23 Dec 2013 23:55:30 +0000 Subject: Read children of w:smartTag --- tests/docx/document_xml_tests.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/docx/document_xml_tests.py') diff --git a/tests/docx/document_xml_tests.py b/tests/docx/document_xml_tests.py index 75b0e20..caeaeb8 100644 --- a/tests/docx/document_xml_tests.py +++ b/tests/docx/document_xml_tests.py @@ -129,6 +129,18 @@ class ReadXmlElementTests(object): _read_and_get_document_xml_element(element) ) + @istest + def children_of_w_smart_tag_are_converted_normally(self): + element = xml_element("w:p", {}, [ + xml_element("w:smartTag", {}, [ + xml_element("w:r") + ]) + ]) + assert_equal( + documents.paragraph([documents.run([])]), + _read_and_get_document_xml_element(element) + ) + @istest def hyperlink_is_read_if_it_has_a_relationship_id(self): relationships = Relationships({ -- cgit v1.2.3