Merge pull request #4567 from hugovk/rm-warning

Don't show own deprecation warning in test logs
This commit is contained in:
Andrew Murray 2020-04-21 19:16:50 +10:00 committed by GitHub
commit 394f7a0449
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,8 +95,9 @@ class TestImageFile:
def test_raise_ioerror(self):
with pytest.raises(IOError):
with pytest.raises(DeprecationWarning):
with pytest.warns(DeprecationWarning) as record:
ImageFile.raise_ioerror(1)
assert len(record) == 1
def test_raise_oserror(self):
with pytest.raises(OSError):