@@ -239,7 +239,7 @@ def test_4457():
239239 ('https://github.com/user-attachments/files/20862923/test_4457_a.pdf' , 'test_4457_a.pdf' , None , 4 ),
240240 ('https://github.com/user-attachments/files/20862922/test_4457_b.pdf' , 'test_4457_b.pdf' , None , 9 ),
241241 )
242- for url , name , size , rms_after_max in files :
242+ for url , name , size , rms_old_after_max in files :
243243 path = util .download (url , name , size )
244244
245245 with pymupdf .open (path ) as document :
@@ -318,10 +318,13 @@ def test_4457():
318318 assert text_before == text
319319 assert rms_before == 0
320320
321- # As of 2025-05-20 there are some differences in some characters, e.g.
322- # the non-ascii characters in `Philipp Krahenbuhl`.
323- # See <path_pixmap> and <path_pixmap_after>.
324- assert rms_after < rms_after_max
321+ if pymupdf .mupdf_version_tuple >= (1 , 27 ):
322+ assert rms_after == 0
323+ else :
324+ # As of 2025-05-20 there are some differences in some characters,
325+ # e.g. the non-ascii characters in `Philipp Krahenbuhl`. See
326+ # <path_pixmap> and <path_pixmap_after>.
327+ assert abs (rms_after - rms_old_after_max ) < 2
325328
326329 # Avoid test failure caused by mupdf warnings.
327330 wt = pymupdf .TOOLS .mupdf_warnings ()
0 commit comments