aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-07-18 15:17:52 +0100
committerMichael Williamson <mike@zwobble.org>2014-07-18 15:17:52 +0100
commit0b4abd3026ac77d8b7ea4f9adde759ca90abc2f6 (patch)
treea159f24d8b178c8106fe2e1b01200966950f1197 /tests
parent0bee7e30ca0f184169196e46a85e3a9d9c92eea0 (diff)
Read underlined runs
Diffstat (limited to 'tests')
-rw-r--r--tests/docx/document_xml_tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/docx/document_xml_tests.py b/tests/docx/document_xml_tests.py
index 133726c..984609d 100644
--- a/tests/docx/document_xml_tests.py
+++ b/tests/docx/document_xml_tests.py
@@ -131,6 +131,16 @@ class ReadXmlElementTests(object):
def run_is_italic_if_italic_element_is_present(self):
run = self._read_run_with_properties([xml_element("w:i")])
assert_equal(True, run.is_italic)
+
+ @istest
+ def run_is_not_underlined_if_underline_element_is_not_present(self):
+ run = self._read_run_with_properties([])
+ assert_equal(False, run.is_underline)
+
+ @istest
+ def run_is_underlined_if_underline_element_is_present(self):
+ run = self._read_run_with_properties([xml_element("w:u")])
+ assert_equal(True, run.is_underline)
def _read_run_with_properties(self, properties, styles=None):
properties_xml = xml_element("w:rPr", {}, properties)