Skip to content

Commit 394f7a0

Browse files
authored
Merge pull request #4567 from hugovk/rm-warning
Don't show own deprecation warning in test logs
2 parents a0d8e55 + 852e53e commit 394f7a0

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.raises(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)