aboutsummaryrefslogtreecommitdiff
path: root/tests/docx
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2024-06-13 12:58:12 +0100
committerMichael Williamson <mike@zwobble.org>2024-06-13 12:58:12 +0100
commit9892cf6c3fc0e3ef2a4095a742c8e8fb73113fb4 (patch)
tree262c1a5b9357fe2ad9ae1aad9646c162c67df220 /tests/docx
parentb874c8214b9734cc8cca5ef21176ff7cc16fcee3 (diff)
Handle highlight value of none
Diffstat (limited to 'tests/docx')
-rw-r--r--tests/docx/body_xml_tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/docx/body_xml_tests.py b/tests/docx/body_xml_tests.py
index 18cba72..117d966 100644
--- a/tests/docx/body_xml_tests.py
+++ b/tests/docx/body_xml_tests.py
@@ -414,6 +414,11 @@ class RunTests(object):
run = self._read_run_with_properties([highlight_xml])
assert_equal("yellow", run.highlight)
+ def test_when_highlight_is_none_then_run_has_no_highlight(self):
+ highlight_xml = xml_element("w:highlight", {"w:val": "none"})
+ run = self._read_run_with_properties([highlight_xml])
+ assert_equal(None, run.highlight)
+
def _read_run_with_properties(self, properties, styles=None):
properties_xml = xml_element("w:rPr", {}, properties)
run_xml = xml_element("w:r", {}, [properties_xml])