aboutsummaryrefslogtreecommitdiff
path: root/tests/mammoth_tests.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-06-17 15:05:19 +0100
committerMichael Williamson <mike@zwobble.org>2015-06-17 15:05:19 +0100
commit147fabb2b2e00f7790304b7a1e1f40cdb564cb4f (patch)
treefcd72fdbdf3681acd1dff8dd6237143a80914cfa /tests/mammoth_tests.py
parent35d3dd58400d5310fe05ebe8e070c96c756edac0 (diff)
Support underlines in style map
Diffstat (limited to 'tests/mammoth_tests.py')
-rw-r--r--tests/mammoth_tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/mammoth_tests.py b/tests/mammoth_tests.py
index a1b396c..e7e7e64 100644
--- a/tests/mammoth_tests.py
+++ b/tests/mammoth_tests.py
@@ -124,6 +124,13 @@ def underline_can_be_configured_with_convert_underline_option():
@istest
+def underline_can_be_configured_with_style_mapping():
+ with open(test_path("underline.docx"), "rb") as fileobj:
+ result = mammoth.convert_to_html(fileobj=fileobj, style_map="u => em")
+ assert_equal('<p><strong>The </strong><strong><em>Sunset</em></strong><strong> Tree</strong></p>', result.value)
+
+
+@istest
def transform_document_is_applied_to_document_before_conversion():
def transform_document(document):
document.children[0].style_id = "Heading1"