Skip to content

Commit

Permalink
Adjust should_fail
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma committed May 29, 2022
1 parent 6becad1 commit 3c86635
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,17 +255,17 @@ def test_issue297():


@pytest.mark.parametrize(
("password", "shouldFail"), [("test", False), ("qwerty", True)]
("password", "should_fail"), [("test", False), ("qwerty", True)]
)
def test_get_page_of_encrypted_file(password, shouldFail):
def test_get_page_of_encrypted_file(password, should_fail):
"""
Check if we can read a page of an encrypted file.
This is a regression test for issue 327:
IndexError for get_page() of decrypted file
"""
path = os.path.join(RESOURCE_ROOT, "encrypted-file.pdf")
if shouldFail:
if should_fail:
with pytest.raises(PdfReadError):
PdfReader(path, password=password)
else:
Expand Down

0 comments on commit 3c86635

Please sign in to comment.