Skip to content

Commit

Permalink
tests/: added test for #3654
Browse files Browse the repository at this point in the history
This test now passes after earlier commit.
  • Loading branch information
julian-smith-artifex-com committed Jul 4, 2024
1 parent 193deaf commit b89695c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Binary file added tests/resources/test_3654.docx
Binary file not shown.
13 changes: 13 additions & 0 deletions tests/test_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -1246,3 +1246,16 @@ def test_3615():
print(doc.pagelayout)
wt = pymupdf.TOOLS.mupdf_warnings()
assert wt

def test_3654():
path = os.path.normpath(f'{__file__}/../../tests/resources/test_3654.docx')
content = ""
with pymupdf.open(path) as document:
for page in document:
content += page.get_text() + '\n\n'
content = content.strip()

# As of 2024-07-04 we get a warning for this input file.
wt = pymupdf.TOOLS.mupdf_warnings()
assert wt == 'dropping unclosed output'

0 comments on commit b89695c

Please sign in to comment.