from nose.tools import istest, assert_equal from .testing import test_path import mammoth @istest def docx_containing_one_paragraph_is_converted_to_single_p_element(): with open(test_path("single-paragraph.docx"), "rb") as fileobj: result = mammoth.convert_to_html(fileobj=fileobj) assert_equal("

Walking on imported air

", result.value) assert_equal([], result.messages)