Skip to content

Commit a0641b8

Browse files
committed
Assert that warning is raised
1 parent 270bc4f commit a0641b8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Tests/test_imagefile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ def test_safeblock(self):
9595

9696
def test_raise_ioerror(self):
9797
with pytest.raises(IOError):
98-
with pytest.warns(DeprecationWarning):
98+
with pytest.warns(DeprecationWarning) as record:
9999
ImageFile.raise_ioerror(1)
100+
assert len(record) == 1
100101

101102
def test_raise_oserror(self):
102103
with pytest.raises(OSError):

0 commit comments

Comments
 (0)