summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-06-08 22:04:19 +0100
committerMichael Williamson <mike@zwobble.org>2014-06-08 22:04:19 +0100
commit3c525db3fba3e408db289b4714352b9cdde797db (patch)
tree439d4d72ed1f5d80d5c952a3b852dc388e14b878 /tests
parentfc4b652532f0611e4cbaaf2b6558a70ff265ef9c (diff)
Read name of style
Diffstat (limited to 'tests')
-rw-r--r--tests/docx/styles_xml_tests.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/docx/styles_xml_tests.py b/tests/docx/styles_xml_tests.py
index c4f659d..2f04ade 100644
--- a/tests/docx/styles_xml_tests.py
+++ b/tests/docx/styles_xml_tests.py
@@ -46,6 +46,18 @@ def paragraph_and_character_styles_are_distinct():
assert_equal(None, styles.find_paragraph_style_by_id("Heading1Char"))
+@istest
+def styles_include_names():
+ element = xml_element("w:styles", {}, [
+ _paragraph_style_element("Heading1", "Heading 1"),
+ ])
+ styles = read_styles_xml_element(element)
+ assert_equal(
+ "Heading 1",
+ styles.find_paragraph_style_by_id("Heading1").name
+ )
+
+
def _paragraph_style_element(style_id, name):
return _style_element("paragraph", style_id, name)