Skip to content

Commit

Permalink
tests/: added test_3650().
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-smith-artifex-com committed Sep 2, 2024
1 parent e5bb5ba commit 72bb79c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Binary file added tests/resources/test_3650.pdf
Binary file not shown.
11 changes: 11 additions & 0 deletions tests/test_textextract.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,14 @@ def get_all_page_from_pdf(document, last_page=None):

wt = pymupdf.TOOLS.mupdf_warnings()
assert wt == 'Actualtext with no position. Text may be lost or mispositioned.\n... repeated 434 times...'

def test_3650():
path = os.path.normpath(f'{__file__}/../../tests/resources/test_3650.pdf')
doc = pymupdf.Document(path)
blocks = doc[0].get_text("blocks")
t = [block[4] for block in blocks]
print(f'{t=}')
assert t == [
'RECUEIL DES ACTES ADMINISTRATIFS\n',
'n° 78 du 28 avril 2023\n',
]

0 comments on commit 72bb79c

Please sign in to comment.