Skip to content

Commit

Permalink
TST: Check for metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma committed Apr 15, 2022
1 parent d71fb3e commit eda50ac
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@
def test_read_metadata(pdf_path, expected):
with open(pdf_path, "rb") as inputfile:
reader = PdfFileReader(inputfile)
metadict = reader.getDocumentInfo()
assert dict(metadict) == expected
docinfo = reader.getDocumentInfo()
metadict = dict(docinfo)
assert metadict == expected
if '/Title' in metadict:
assert metadict['/Title'] == docinfo.title


@pytest.mark.parametrize(
Expand Down

0 comments on commit eda50ac

Please sign in to comment.