diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/mammoth_tests.py | 7 | ||||
| -rw-r--r-- | tests/test-data/strict-format.docx | bin | 0 -> 11692 bytes |
2 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: diff --git a/tests/test-data/strict-format.docx b/tests/test-data/strict-format.docx Binary files differnew file mode 100644 index 0000000..4495720 --- /dev/null +++ b/tests/test-data/strict-format.docx |
