mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 02:06:18 +03:00
flake8
This commit is contained in:
parent
36baea18ee
commit
2389492f96
|
@ -6,7 +6,6 @@ TEST_FILE = "Tests/images/hopper.ppm"
|
||||||
|
|
||||||
ORIGINAL_LIMIT = Image.MAX_IMAGE_PIXELS
|
ORIGINAL_LIMIT = Image.MAX_IMAGE_PIXELS
|
||||||
|
|
||||||
from PIL.Image import DecompressionBombWarning, DecompressionBombError
|
|
||||||
|
|
||||||
class TestDecompressionBomb(PillowTestCase):
|
class TestDecompressionBomb(PillowTestCase):
|
||||||
|
|
||||||
|
@ -79,11 +78,12 @@ class TestDecompressionCrop(PillowTestCase):
|
||||||
self.assertEqual(im.crop(value).size, (9, 9))
|
self.assertEqual(im.crop(value).size, (9, 9))
|
||||||
|
|
||||||
for value in warning_values:
|
for value in warning_values:
|
||||||
self.assert_warning(DecompressionBombWarning, im.crop, value)
|
self.assert_warning(Image.DecompressionBombWarning, im.crop, value)
|
||||||
|
|
||||||
for value in error_values:
|
for value in error_values:
|
||||||
with self.assertRaises(DecompressionBombError):
|
with self.assertRaises(Image.DecompressionBombError):
|
||||||
im.crop(value)
|
im.crop(value)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user