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