Skip to content

Commit 610086c

Browse files
tests/: test_4182(): update to match latest mupdf.
1 parent f63cb4e commit 610086c

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed
-487 Bytes
Loading

tests/test_textextract.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ def test_4245():
479479
print(f'{rms=}')
480480
if pymupdf.mupdf_version_tuple < (1, 26):
481481
# Prior to fix for mupdf bug 708274.
482-
assert rms < 0.2
482+
assert 0.1 < rms < 0.2
483483
else:
484484
assert rms < 0.01
485485

@@ -504,7 +504,7 @@ def test_4180():
504504
print(f'{rms=}')
505505
if pymupdf.mupdf_version_tuple < (1, 26):
506506
# Prior to fix for mupdf bug 708274.
507-
assert rms < 0.3
507+
assert 0.2 < rms < 0.3
508508
else:
509509
assert rms < 0.01
510510

@@ -531,9 +531,16 @@ def test_4182():
531531
for l in linelist:
532532
print(l)
533533
path_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_4182_expected.png')
534+
pixmap_diff = gentle_compare.pixmaps_diff(path_expected, pixmap)
535+
path_diff = os.path.normpath(f'{__file__}/../../tests/resources/test_4182_diff.png')
536+
pixmap_diff.save(path_diff)
534537
rms = gentle_compare.pixmaps_rms(path_expected, pixmap)
535538
print(f'{rms=}')
536-
assert rms < 0.01
539+
if pymupdf.mupdf_version_tuple < (1, 26):
540+
# Prior to fix for mupdf bug 708274.
541+
assert 3 < rms < 3.5
542+
else:
543+
assert rms < 0.01
537544

538545

539546
def test_4179():

0 commit comments

Comments
 (0)