Skip to content

Commit d45feb5

Browse files
tests/: added test_4026().
1 parent dfed029 commit d45feb5

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tests/resources/test_4026.pdf

2.27 MB
Binary file not shown.

tests/test_textextract.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,3 +387,16 @@ def test_3650():
387387
'RECUEIL DES ACTES ADMINISTRATIFS\n',
388388
'n° 78 du 28 avril 2023\n',
389389
]
390+
391+
def test_4026():
392+
path = os.path.normpath(f'{__file__}/../../tests/resources/test_4026.pdf')
393+
with pymupdf.open(path) as document:
394+
page = document[4]
395+
blocks = page.get_text('blocks')
396+
for i, block in enumerate(blocks):
397+
print(f'block {i}: {block}')
398+
if pymupdf.mupdf_version_tuple < (1, 25):
399+
assert len(blocks) == 15
400+
else:
401+
assert len(blocks) == 5
402+

0 commit comments

Comments
 (0)