From 8f5f498d8fa7eddd9a6da6cd147a0565adb494ae Mon Sep 17 00:00:00 2001 From: Jeremy Singer-Vine Date: Sun, 9 Feb 2025 17:23:37 -0500 Subject: [PATCH] Fix wrong exception expectation in test --- tests/test_basics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 @@ class Test(unittest.TestCase): 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