Skip to content

Commit 35a2974

Browse files
tests/: added test for #3654
This test now passes after earlier commit.
1 parent 4258f7c commit 35a2974

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tests/resources/test_3654.docx

13 KB
Binary file not shown.

tests/test_general.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,3 +1246,16 @@ def test_3615():
12461246
print(doc.pagelayout)
12471247
wt = pymupdf.TOOLS.mupdf_warnings()
12481248
assert wt
1249+
1250+
def test_3654():
1251+
path = os.path.normpath(f'{__file__}/../../tests/resources/test_3654.docx')
1252+
content = ""
1253+
with pymupdf.open(path) as document:
1254+
for page in document:
1255+
content += page.get_text() + '\n\n'
1256+
content = content.strip()
1257+
1258+
# As of 2024-07-04 we get a warning for this input file.
1259+
wt = pymupdf.TOOLS.mupdf_warnings()
1260+
assert wt == 'dropping unclosed output'
1261+

0 commit comments

Comments
 (0)