Skip to content

Commit

Permalink
TST: Add test for issue #297
Browse files Browse the repository at this point in the history
It's not fixed, but at least we can test it now easily. We still get:

ValueError: invalid literal for int() with base 10
  • Loading branch information
MartinThoma committed Apr 11, 2022
1 parent f881d89 commit 966eb5d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Binary file added Resources/issue-297.pdf
Binary file not shown.
14 changes: 13 additions & 1 deletion Tests/test_reader.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import io
import os
import pytest
import PyPDF2
import PyPDF2.utils
from PyPDF2.filters import decodeStreamData, _xobj_to_image

TESTS_ROOT = os.path.abspath(os.path.dirname(__file__))
Expand Down Expand Up @@ -157,3 +157,15 @@ def test_get_images_raw(strict, with_prev_0, should_fail):
PyPDF2.PdfFileReader(pdf_stream, strict=strict)
else:
PyPDF2.PdfFileReader(pdf_stream, strict=strict)


@pytest.mark.xfail(
reason=(
"It's still broken - and unclear what the issue is. "
"Help would be appreciated!"
)
)
def test_issue297():
path = os.path.join(RESOURCE_ROOT, "issue-297.pdf")
reader = PyPDF2.PdfFileReader(path, "rb")
reader.getPage(0)

0 comments on commit 966eb5d

Please sign in to comment.