Skip to content

Commit 4b0ff58

Browse files
sebrasjulian-smith-artifex-com
authored andcommitted
tests/: Updated tests to take mupdf 1.25.5 into account.
1 parent 702b8dc commit 4b0ff58

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

tests/test_annots.py

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

478478
def test_4079():
479479
path = os.path.normpath(f'{__file__}/../../tests/resources/test_4079.pdf')
480-
if pymupdf.mupdf_version_tuple >= (1, 26):
480+
if pymupdf.mupdf_version_tuple >= (1, 25, 5):
481481
path_after = os.path.normpath(f'{__file__}/../../tests/resources/test_4079_after.pdf')
482482
else:
483483
# 2024-11-27 Expect incorrect behaviour.

tests/test_pixmap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ def test_3448():
416416
print(f'{rms=}')
417417
if pymupdf.mupdf_version_tuple < (1, 24, 11):
418418
assert 30 <= rms < 45
419-
elif pymupdf.mupdf_version_tuple < (1, 26):
419+
elif pymupdf.mupdf_version_tuple < (1, 25, 5):
420420
# Prior to fix for mupdf bug 708274.
421421
assert 1 < rms < 2
422422
else:
@@ -442,7 +442,7 @@ def test_3854():
442442
# MuPDF using external third-party libs gives slightly different
443443
# behaviour.
444444
assert rms < 2
445-
elif pymupdf.mupdf_version_tuple < (1, 26):
445+
elif pymupdf.mupdf_version_tuple < (1, 25, 5):
446446
# # Prior to fix for mupdf bug 708274.
447447
assert 0.5 < rms < 2
448448
else:

tests/test_textextract.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ def test_4245():
479479
path_diff = os.path.normpath(f'{__file__}/../../tests/resources/test_4245_diff.png')
480480
pixmap_diff.save(path_diff)
481481
print(f'{rms=}')
482-
if pymupdf.mupdf_version_tuple < (1, 26):
482+
if pymupdf.mupdf_version_tuple < (1, 25, 5):
483483
# Prior to fix for mupdf bug 708274.
484484
assert 0.1 < rms < 0.2
485485
else:
@@ -504,7 +504,7 @@ def test_4180():
504504
path_diff = os.path.normpath(f'{__file__}/../../tests/resources/test_4180_diff.png')
505505
pixmap_diff.save(path_diff)
506506
print(f'{rms=}')
507-
if pymupdf.mupdf_version_tuple < (1, 26):
507+
if pymupdf.mupdf_version_tuple < (1, 25, 5):
508508
# Prior to fix for mupdf bug 708274.
509509
assert 0.2 < rms < 0.3
510510
else:
@@ -538,7 +538,7 @@ def test_4182():
538538
pixmap_diff.save(path_diff)
539539
rms = gentle_compare.pixmaps_rms(path_expected, pixmap)
540540
print(f'{rms=}')
541-
if pymupdf.mupdf_version_tuple < (1, 26):
541+
if pymupdf.mupdf_version_tuple < (1, 25, 5):
542542
# Prior to fix for mupdf bug 708274.
543543
assert 3 < rms < 3.5
544544
else:
@@ -627,7 +627,7 @@ def test_4179():
627627
pixmap_diff.save(path_out_diff)
628628
print(f'Have saved to: {path_out_diff=}')
629629
print(f'{rms=}')
630-
if pymupdf.mupdf_version_tuple < (1, 26):
630+
if pymupdf.mupdf_version_tuple < (1, 25, 5):
631631
# Prior to fix for mupdf bug 708274, our rects are rendered slightly incorrectly.
632632
assert 3.5 < rms < 4.5
633633
else:

0 commit comments

Comments
 (0)