Skip to content

Commit

Permalink
Fix wrong exception expectation in test
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvine committed Feb 9, 2025
1 parent 43ccc5b commit 8f5f498
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,11 @@ def test_loading_fileobj(self):

def test_bad_fileobj(self):
path = os.path.join(HERE, "pdfs/empty.pdf")
with pytest.raises(pdfplumber.pdf.PSException):
with pytest.raises(pdfplumber.utils.exceptions.PdfminerException):
pdfplumber.open(path)

f = open(path)
with pytest.raises(pdfplumber.pdf.PSException):
with pytest.raises(pdfplumber.utils.exceptions.PdfminerException):
pdfplumber.open(f)
# File objects passed to pdfplumber should not be auto-closed
assert not f.closed
Expand Down

0 comments on commit 8f5f498

Please sign in to comment.