aboutsummaryrefslogtreecommitdiff
path: root/tests/mammoth_tests.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2024-02-18 13:02:48 +0000
committerMichael Williamson <mike@zwobble.org>2024-02-18 13:02:48 +0000
commit1db36be2c2ed7db9b1e3ec96720cd1f3f17753c2 (patch)
treeb351d57c8ef9a7e278bbb3b7aca930d250d57b13 /tests/mammoth_tests.py
parent414f1cdd630de5a157dd54d3edd4da17bf313b49 (diff)
Add support for the strict document format
Diffstat (limited to 'tests/mammoth_tests.py')
-rw-r--r--tests/mammoth_tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/mammoth_tests.py b/tests/mammoth_tests.py
index b8c6a11..36d0e83 100644
--- a/tests/mammoth_tests.py
+++ b/tests/mammoth_tests.py
@@ -299,6 +299,13 @@ def test_can_extract_raw_text():
assert_equal("Apple\n\nBanana\n\n", result.value)
+def test_can_read_strict_format():
+ with open(generate_test_path("strict-format.docx"), "rb") as fileobj:
+ result = mammoth.convert_to_html(fileobj=fileobj)
+ assert_equal([], result.messages)
+ assert_equal("<p>Test</p>", result.value)
+
+
def _copy_of_test_data(path):
destination = io.BytesIO()
with open(generate_test_path(path), "rb") as source: