Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/test_2548.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def test_2548():
# This checks that PyMuPDF 1.23.7 fixes this bug, and also that earlier
# versions with updated MuPDF also fix the bug.
rebased = hasattr(pymupdf, 'mupdf')
if pymupdf.mupdf_version_tuple >= (1, 27):
if pymupdf.mupdf_version_tuple >= (1, 28):
expected = ''
elif pymupdf.mupdf_version_tuple >= (1, 27):
expected = 'format error: No common ancestor in structure tree\nstructure tree broken, assume tree is missing'
expected = '\n'.join([expected] * 5)
else:
Expand Down
15 changes: 12 additions & 3 deletions tests/test_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,11 +911,17 @@ def test_bboxlog_2885():

bbl = page.get_bboxlog()
wt = pymupdf.TOOLS.mupdf_warnings()
assert wt == 'invalid marked content and clip nesting'
if pymupdf.mupdf_version_tuple >= (1, 28):
assert wt == ''
else:
assert wt == 'invalid marked content and clip nesting'

bbl = page.get_bboxlog(layers=True)
wt = pymupdf.TOOLS.mupdf_warnings()
assert wt == 'invalid marked content and clip nesting'
if pymupdf.mupdf_version_tuple >= (1, 28):
assert wt == ''
else:
assert wt == 'invalid marked content and clip nesting'

def test_3081():
'''
Expand Down Expand Up @@ -1757,7 +1763,10 @@ def test_3569():
'</svg>\n'
)
wt = pymupdf.TOOLS.mupdf_warnings()
assert wt == 'unknown cid collection: PDFAUTOCAD-Indentity0\nnon-embedded font using identity encoding: ArialMT (mapping via )\ninvalid marked content and clip nesting'
if pymupdf.mupdf_version_tuple >= (1, 28):
assert wt == 'unknown cid collection: PDFAUTOCAD-Indentity0\nnon-embedded font using identity encoding: ArialMT (mapping via )'
else:
assert wt == 'unknown cid collection: PDFAUTOCAD-Indentity0\nnon-embedded font using identity encoding: ArialMT (mapping via )\ninvalid marked content and clip nesting'

def test_3450():
# This issue is a slow-down, so we just show time taken - it's not safe
Expand Down
5 changes: 4 additions & 1 deletion tests/test_textextract.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,10 @@ def get_all_page_from_pdf(document, last_page=None):
assert texts1 == texts0

wt = pymupdf.TOOLS.mupdf_warnings()
if pymupdf.mupdf_version_tuple >= (1, 27):
if pymupdf.mupdf_version_tuple >= (1, 28):
expected = ''
assert wt == expected
elif pymupdf.mupdf_version_tuple >= (1, 27):
expected = 'format error: No common ancestor in structure tree\nstructure tree broken, assume tree is missing'
expected = '\n'.join([expected] * 56)
assert wt == expected
Expand Down
Loading