diff --git a/tests/test_basics.py b/tests/test_basics.py index 9893228..395fcf7 100644 --- a/tests/test_basics.py +++ b/tests/test_basics.py @@ -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