Skip to content

Commit 8a946b8

Browse files
tests/: update test_4079 for progression in latest mupdf.
1 parent f5d0ea2 commit 8a946b8

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed
-1.02 KB
Binary file not shown.
138 KB
Binary file not shown.

tests/test_annots.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,10 @@ def test_4047():
477477

478478
def test_4079():
479479
path = os.path.normpath(f'{__file__}/../../tests/resources/test_4079.pdf')
480-
path_after = os.path.normpath(f'{__file__}/../../tests/resources/test_4079_after.pdf')
480+
if pymupdf.mupdf_version_tuple >= (1, 26):
481+
path_after = os.path.normpath(f'{__file__}/../../tests/resources/test_4079_after.pdf')
482+
else:path_after = os.path.normpath(f'{__file__}/../../tests/resources/test_4079_after_1.25.pdf')
483+
481484
path_out = os.path.normpath(f'{__file__}/../../tests/test_4079_out')
482485
with pymupdf.open(path_after) as document_after:
483486
page = document_after[0]
@@ -500,6 +503,9 @@ def test_4079():
500503
pixmap_after = page.get_pixmap()
501504
document.save(f'{path_out}_after.pdf')
502505
rms = gentle_compare.pixmaps_rms(pixmap_after_expected, pixmap_after)
506+
diff = gentle_compare.pixmaps_diff(pixmap_after_expected, pixmap_after)
507+
path = os.path.normpath(f'{__file__}/../../tests/test_4079_diff.png')
508+
diff.save(path)
503509
print(f'{rms=}')
504510
# 2024-11-27 Expect current broken behaviour.
505511
assert rms == 0

0 commit comments

Comments
 (0)