diff --git a/Tests/test_imagefile.py b/Tests/test_imagefile.py index 649b0ac9b..7719c7c71 100644 --- a/Tests/test_imagefile.py +++ b/Tests/test_imagefile.py @@ -95,7 +95,7 @@ class TestImageFile: def test_raise_ioerror(self): with pytest.raises(IOError): - with pytest.raises(DeprecationWarning): + with pytest.warns(DeprecationWarning): ImageFile.raise_ioerror(1) def test_raise_oserror(self):