diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-12-01 01:15:25 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-12-01 01:15:25 +0000 |
| commit | 68047ef381cb08cf43e5a30ca9dd6e40ccde8cdd (patch) | |
| tree | dcf862340c7c5d65f94264ddb28dde62aa1c1d5e /tests | |
| parent | 25706255c4a746b6c14afe2d9dd45cf50c2d2208 (diff) | |
Add basic conversion to HTML
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/__init__.py | 1 | ||||
| -rw-r--r-- | tests/mammoth_tests.py | 13 |
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) |
