Skip to content

Commit

Permalink
Merge pull request #51 from radarhere/rm-warning
Browse files Browse the repository at this point in the history
Assert that warning is raised
  • Loading branch information
hugovk committed Apr 20, 2020
2 parents 270bc4f + a0641b8 commit 852e53e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tests/test_imagefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ def test_safeblock(self):

def test_raise_ioerror(self):
with pytest.raises(IOError):
with pytest.warns(DeprecationWarning):
with pytest.warns(DeprecationWarning) as record:
ImageFile.raise_ioerror(1)
assert len(record) == 1

def test_raise_oserror(self):
with pytest.raises(OSError):
Expand Down

0 comments on commit 852e53e

Please sign in to comment.