From 6b6163f5aebd604e76add5e383f91453f906d3f7 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 19 Nov 2016 19:44:31 +0000 Subject: Test that explicit style map takes precendence over embedded style map --- tests/mammoth_tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/mammoth_tests.py b/tests/mammoth_tests.py index 1f638ec..4a524e8 100644 --- a/tests/mammoth_tests.py +++ b/tests/mammoth_tests.py @@ -55,6 +55,14 @@ def embedded_style_map_is_used_if_present(): assert_equal([], result.messages) +@istest +def explicit_style_map_takes_precedence_over_embedded_style_map(): + with open(test_path("embedded-style-map.docx"), "rb") as fileobj: + result = mammoth.convert_to_html(fileobj=fileobj, style_map="p => p") + assert_equal("

Walking on imported air

", result.value) + assert_equal([], result.messages) + + @istest def embedded_style_map_can_be_written_and_then_read(): with _copy_of_test_data("single-paragraph.docx") as fileobj: -- cgit v1.2.3