From 68047ef381cb08cf43e5a30ca9dd6e40ccde8cdd Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 1 Dec 2013 01:15:25 +0000 Subject: Add basic conversion to HTML --- tests/__init__.py | 1 + tests/mammoth_tests.py | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 tests/__init__.py create mode 100644 tests/mammoth_tests.py (limited to 'tests') diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1 @@ + diff --git a/tests/mammoth_tests.py b/tests/mammoth_tests.py new file mode 100644 index 0000000..4550d91 --- /dev/null +++ b/tests/mammoth_tests.py @@ -0,0 +1,13 @@ +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")) as fileobj: + result = mammoth.convert_to_html(fileobj=fileobj) + assert_equal("

Walking on imported air

", result.value) + assert_equal([], result.messages) -- cgit v1.2.3