From de55a714711a27207367bc8c5c8370549a9bd219 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 23 Jan 2017 20:17:18 +0000 Subject: Handle target URIs relative to the base --- tests/mammoth_tests.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests/mammoth_tests.py') diff --git a/tests/mammoth_tests.py b/tests/mammoth_tests.py index 322ebf7..8789855 100644 --- a/tests/mammoth_tests.py +++ b/tests/mammoth_tests.py @@ -108,13 +108,21 @@ p => h1""" @istest -def inline_images_are_included_in_output(): +def inline_images_referenced_by_path_relative_to_part_are_included_in_output(): with open(test_path("tiny-picture.docx"), "rb") as fileobj: result = mammoth.convert_to_html(fileobj=fileobj) assert_equal("""

""", result.value) assert_equal([], result.messages) +@istest +def inline_images_referenced_by_path_relative_to_base_are_included_in_output(): + with open(test_path("tiny-picture-target-base-relative.docx"), "rb") as fileobj: + result = mammoth.convert_to_html(fileobj=fileobj) + assert_equal("""

""", result.value) + assert_equal([], result.messages) + + @istest def images_stored_outside_of_document_are_included_in_output(): with open(test_path("external-picture.docx"), "rb") as fileobj: -- cgit v1.2.3