Skip to content

Commit 1ed74e8

Browse files
tests/: test_3448(): update to match latest mupdf.
1 parent 2d68b1f commit 1ed74e8

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed
20 Bytes
Loading

tests/test_pixmap.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,18 @@ def test_3448():
406406
print(f'Have written to: {path_out}')
407407
path_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_3448.pdf-expected.png')
408408
pixmap_expected = pymupdf.Pixmap(path_expected)
409-
diff = gentle_compare.pixmaps_rms(pixmap, pixmap_expected)
410-
print(f'{diff=}')
409+
rms = gentle_compare.pixmaps_rms(pixmap, pixmap_expected)
410+
diff = gentle_compare.pixmaps_diff(pixmap_expected, pixmap)
411+
path_diff = os.path.normpath(f'{__file__}/../../tests/test_3448-diff.png')
412+
diff.save(path_diff)
413+
print(f'{rms=}')
411414
if pymupdf.mupdf_version_tuple < (1, 24, 11):
412-
assert 30 <= diff < 45
415+
assert 30 <= rms < 45
416+
elif pymupdf.mupdf_version_tuple < (1, 26):
417+
# Prior to fix for mupdf bug 708274.
418+
assert 1 < rms < 2
413419
else:
414-
assert 0 <= diff < 0.5
420+
assert rms == 0
415421

416422

417423
def test_3854():

0 commit comments

Comments
 (0)