mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 01:34:24 +03:00
Assert that warning is raised
This commit is contained in:
parent
270bc4fc60
commit
a0641b87c2
|
@ -95,8 +95,9 @@ class TestImageFile:
|
||||||
|
|
||||||
def test_raise_ioerror(self):
|
def test_raise_ioerror(self):
|
||||||
with pytest.raises(IOError):
|
with pytest.raises(IOError):
|
||||||
with pytest.warns(DeprecationWarning):
|
with pytest.warns(DeprecationWarning) as record:
|
||||||
ImageFile.raise_ioerror(1)
|
ImageFile.raise_ioerror(1)
|
||||||
|
assert len(record) == 1
|
||||||
|
|
||||||
def test_raise_oserror(self):
|
def test_raise_oserror(self):
|
||||||
with pytest.raises(OSError):
|
with pytest.raises(OSError):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user