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