aboutsummaryrefslogtreecommitdiff
path: root/tests/mammoth_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mammoth_tests.py')
-rw-r--r--tests/mammoth_tests.py13
1 files changed, 13 insertions, 0 deletions
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("<p>Walking on imported air</p>", result.value)
+ assert_equal([], result.messages)