Skip to content

Commit a5fa4a8

Browse files
sebrasjulian-smith-artifex-com
authored andcommitted
tests/: Updated tests to take mupdf 1.25.4 into account.
1 parent 518c213 commit a5fa4a8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed
File renamed without changes.

tests/test_annots.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ def test_1645():
231231
try:
232232
path_in = os.path.abspath( f'{__file__}/../resources/symbol-list.pdf')
233233

234-
if pymupdf.mupdf_version_tuple >= (1, 26):
235-
path_expected = os.path.abspath( f'{__file__}/../../tests/resources/test_1645_expected_1.26.pdf')
234+
if pymupdf.mupdf_version_tuple >= (1, 25, 4):
235+
path_expected = os.path.abspath( f'{__file__}/../../tests/resources/test_1645_expected_1.25.4.pdf')
236236
elif pymupdf.mupdf_version_tuple >= (1, 25):
237237
path_expected = os.path.abspath( f'{__file__}/../../tests/resources/test_1645_expected_1.25.pdf')
238238
elif pymupdf.mupdf_version_tuple >= (1, 24, 2):

tests/test_tesseract.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def test_tesseract():
2020
page = doc[5]
2121
if hasattr(pymupdf, 'mupdf'):
2222
# rebased.
23-
if pymupdf.mupdf_version_tuple < (1, 26):
23+
if pymupdf.mupdf_version_tuple < (1, 25, 4):
2424
tail = 'OCR initialisation failed'
2525
else:
2626
tail = 'Tesseract language initialisation failed'
@@ -57,7 +57,7 @@ def test_tesseract():
5757
rebased = hasattr(pymupdf, 'mupdf')
5858
if rebased:
5959
wt = pymupdf.TOOLS.mupdf_warnings()
60-
if pymupdf.mupdf_version_tuple < (1, 26):
60+
if pymupdf.mupdf_version_tuple < (1, 25, 4):
6161
assert wt == (
6262
'UNHANDLED EXCEPTION!\n'
6363
'library error: Tesseract initialisation failed'
@@ -81,7 +81,7 @@ def test_3842b():
8181
if 'No tessdata specified and Tesseract is not installed' in str(e):
8282
pass
8383
else:
84-
if pymupdf.mupdf_version_tuple < (1, 26):
84+
if pymupdf.mupdf_version_tuple < (1, 25, 4):
8585
assert 'OCR initialisation failed' in str(e)
8686
wt = pymupdf.TOOLS.mupdf_warnings()
8787
assert wt == 'UNHANDLED EXCEPTION!\nlibrary error: Tesseract initialisation failed\nUNHANDLED EXCEPTION!\nlibrary error: Tesseract initialisation failed', \

0 commit comments

Comments
 (0)