Skip to content

Commit 61b8baf

Browse files
tests/: test_3854(): update to match latest mupdf.
1 parent 1ed74e8 commit 61b8baf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
-52 Bytes
Loading

tests/test_pixmap.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,13 +430,18 @@ def test_3854():
430430
# 2024-11-29: this is the incorrect expected output.
431431
path_expected_png = os.path.normpath(f'{__file__}/../../tests/resources/test_3854_expected.png')
432432
pixmap_expected = pymupdf.Pixmap(path_expected_png)
433-
433+
pixmap_diff = gentle_compare.pixmaps_diff(pixmap_expected, pixmap)
434+
path_diff = os.path.normpath(f'{__file__}/../../tests/resources/test_3854_diff.png')
435+
pixmap_diff.save(path_diff)
434436
rms = gentle_compare.pixmaps_rms(pixmap, pixmap_expected)
435437
print(f'{rms=}.')
436438
if os.environ.get('PYMUPDF_SYSINSTALL_TEST') == '1':
437439
# MuPDF using external third-party libs gives slightly different
438440
# behaviour.
439-
assert rms < 1
441+
assert rms < 2
442+
elif pymupdf.mupdf_version_tuple < (1, 26):
443+
# # Prior to fix for mupdf bug 708274.
444+
assert 0.5 < rms < 2
440445
else:
441446
assert rms == 0
442447

0 commit comments

Comments
 (0)