diff --git a/scripts/test.py b/scripts/test.py index a0529e62b..42dab0a22 100755 --- a/scripts/test.py +++ b/scripts/test.py @@ -346,6 +346,9 @@ def main(argv): elif arg == '--cibw-release-2': env_extra['CIBW_ARCHS_LINUX'] = 'aarch64' + # Testing only first and last python versions because otherwise + # Github times out after 6h. + env_extra['CIBW_BUILD'] = 'cp39* cp313*' os_names = ['linux'] elif arg == '--cibw-archs-linux': diff --git a/tests/resources/test_4564.pdf b/tests/resources/test_4564.pdf new file mode 100644 index 000000000..486a100f9 Binary files /dev/null and b/tests/resources/test_4564.pdf differ diff --git a/tests/test_font.py b/tests/test_font.py index 58396984c..4d5958cd9 100644 --- a/tests/test_font.py +++ b/tests/test_font.py @@ -233,8 +233,8 @@ def test_3887(): def test_4457(): print() files = ( - ('https://arxiv.org/pdf/2504.13180', 'test_4457_a.pdf', None, 4), - ('https://arxiv.org/pdf/2504.13181', 'test_4457_b.pdf', None, 9), + ('https://github.com/user-attachments/files/20862923/test_4457_a.pdf', 'test_4457_a.pdf', None, 4), + ('https://github.com/user-attachments/files/20862922/test_4457_b.pdf', 'test_4457_b.pdf', None, 9), ) for url, name, size, rms_after_max in files: path = util.download(url, name, size) diff --git a/tests/test_general.py b/tests/test_general.py index 0c1620a43..1288c2279 100644 --- a/tests/test_general.py +++ b/tests/test_general.py @@ -1894,3 +1894,16 @@ def test_4533(): with pymupdf.open(path) as document: print(f'Have opened {path=}.', flush=1) print(f'{len(document)=}', flush=1) + + +def test_4564(): + path = os.path.normpath(f'{__file__}/../../tests/resources/test_4564.pdf') + print() + with pymupdf.open(path) as document: + for key in sorted(document.metadata.keys()): + value = document.metadata[key] + print(f'{key}: {value!r}') + if pymupdf.mupdf_version_tuple >= (1, 27): + assert document.metadata['producer'] == 'Adobe PSL 1.3e for Canon\x00' + else: + assert document.metadata['producer'] == 'Adobe PSL 1.3e for Canon\udcc0\udc80'