summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-07-06 17:14:53 +0100
committerMichael Williamson <mike@zwobble.org>2014-07-06 17:14:53 +0100
commit9bfd191c00cf0d6f96eaf4e452cecadab711239e (patch)
tree4efcefe4dd2db210b2c0b3ec264ed2f7a8369622
parent97a654547df018a98a005ba9c0de197774a3de59 (diff)
Add disabled test for tables support
-rw-r--r--tests/mammoth_tests.py15
-rwxr-xr-xtests/test-data/tables.docxbin0 -> 13087 bytes
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/mammoth_tests.py b/tests/mammoth_tests.py
index bc9f99c..deaeb39 100644
--- a/tests/mammoth_tests.py
+++ b/tests/mammoth_tests.py
@@ -29,6 +29,21 @@ def simple_list_is_converted_to_list_elements():
assert_equal("<ul><li>Apple</li><li>Banana</li></ul>", result.value)
+#~ @istest
+def word_tables_are_converted_to_html_tables():
+ expected_html = ("<p>Above</p>" +
+ "<table>" +
+ "<tr><td><p>Top left</p></td><td><p>Top right</p></td></tr>" +
+ "<tr><td><p>Bottom left</p></td><td><p>Bottom right</p></td></tr>" +
+ "</table>" +
+ "<p>Below</p>")
+
+
+ with open(test_path("tables.docx"), "rb") as fileobj:
+ result = mammoth.convert_to_html(fileobj=fileobj)
+ assert_equal([], result.messages)
+ assert_equal(expected_html, result.value)
+
@istest
def transform_document_is_applied_to_document_before_conversion():
def transform_document(document):
diff --git a/tests/test-data/tables.docx b/tests/test-data/tables.docx
new file mode 100755
index 0000000..86009a7
--- /dev/null
+++ b/tests/test-data/tables.docx
Binary files differ