Skip to content

Commit

Permalink
TST : add test from #325
Browse files Browse the repository at this point in the history
no issue to be solved
  • Loading branch information
pubpub-zz committed Jul 24, 2022
1 parent 0b27287 commit 807f5d5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1002,3 +1002,13 @@ def test_outlines_with_invalid_destinations():
)
# contains 9 outlines, 6 with invalid destinations caused by different malformations
assert len(reader.outlines) == 9


def test_PdfReaderMultipleDefinitions():
# iss325
url = "https://github.com/py-pdf/PyPDF2/files/9176644/multipledefs.pdf"
name = "multipledefs.pdf"
reader = PdfReader(BytesIO(get_pdf_from_url(url, name=name)))
with pytest.warns(PdfReadWarning) as w:
reader.pages[0].extract_text()
assert len(w) == 1

0 comments on commit 807f5d5

Please sign in to comment.