mirror of
https://github.com/jsvine/pdfplumber.git
synced 2026-08-29 16:40:24 +08:00
Fix wrong exception expectation in test
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user