diff --git a/tests/test_general.py b/tests/test_general.py index fcbe99506..6c3bea9eb 100644 --- a/tests/test_general.py +++ b/tests/test_general.py @@ -1720,7 +1720,9 @@ def test_3569(): '\n' ) wt = pymupdf.TOOLS.mupdf_warnings() - if pymupdf.mupdf_version_tuple >= (1, 28): + if pymupdf.mupdf_version_tuple >= (1, 29): + assert wt == 'unknown cid collection: PDFAUTOCAD-Indentity0\nnon-embedded font using identity encoding: ArialMT (mapping via Adobe-Identity-UCS)\ninvalid marked content sequence / clip nesting' + elif pymupdf.mupdf_version_tuple >= (1, 28): assert wt == 'unknown cid collection: PDFAUTOCAD-Indentity0\nnon-embedded font using identity encoding: ArialMT (mapping via )\ninvalid marked content sequence / clip nesting' else: assert wt == 'unknown cid collection: PDFAUTOCAD-Indentity0\nnon-embedded font using identity encoding: ArialMT (mapping via )\ninvalid marked content and clip nesting' @@ -2277,7 +2279,7 @@ def test_5054(): text2 = page.get_text() print(f'{text1=}') print(f'{text2=}') - if pymupdf.mupdf_version_tuple < (1, 29): + if pymupdf.mupdf_version_tuple < (1, 28, 6): assert text2 != text1 else: assert text2 == text1 diff --git a/tests/test_pixmap.py b/tests/test_pixmap.py index a699f3aa8..61ee3a68d 100644 --- a/tests/test_pixmap.py +++ b/tests/test_pixmap.py @@ -806,9 +806,7 @@ def test_5082(): except subprocess.TimeoutExpired: timeout = True print(f'test_5082(): {timeout=}') - # As of 2026-08-18 we expect timeout with 1.28.x (currently 1.28.3) and - # earlier. - if pymupdf.mupdf_version_tuple <= (1, 28, 4): + if pymupdf.mupdf_version_tuple < (1, 28, 6): assert timeout, f'Expected timeout from {pymupdf.mupdf_version=}.' else: assert not timeout, f'Unexpected timeout from {pymupdf.mupdf_version=}.' diff --git a/tests/test_widgets.py b/tests/test_widgets.py index 2408c1fa0..a36fbf8be 100644 --- a/tests/test_widgets.py +++ b/tests/test_widgets.py @@ -546,11 +546,14 @@ def test_5101(): path = os.path.normpath(f'{__file__}/../../tests/resources/test_5101.pdf') with pymupdf.open(path) as document: print(f'{len(document)=}') - if pymupdf.mupdf_version_tuple >= (1, 29): + if pymupdf.mupdf_version_tuple >= (1, 28, 6): page = document[0] wt = pymupdf.TOOLS.mupdf_warnings() print(f'{wt=}') - assert wt == 'cycle in parent chain\nfixed bad Parent in AcroForm tree\n... repeated 2 times...' + if pymupdf.mupdf_version_tuple >= (1, 29): + assert wt == 'cycle in parent chain\nfixed bad Parent in AcroForm tree\n... repeated 2 times...' + else: + assert wt == 'fixed bad Parent in AcroForm tree\n... repeated 2 times...' document2 = pymupdf.open() document2.insert_pdf(document, annots=False, widgets=False, links=True) else: @@ -657,4 +660,3 @@ def get_acro_names(document): assert num_still_present == 0, f'{num_still_present=}' assert num_still_present_acro == 0, f'{num_still_present_acro=}' -