mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-09-26 22:16:59 +03:00
Add (failing) test for #771
This commit is contained in:
parent
4b4ed2c9b1
commit
ff668ae54e
|
@ -39,6 +39,18 @@ class TestDecompressionBomb(PillowTestCase):
|
|||
Image.DecompressionBombWarning,
|
||||
lambda: Image.open(test_file))
|
||||
|
||||
def test_image_new(self):
|
||||
# Arrange
|
||||
# Set limit to a low, easily testable value
|
||||
Image.MAX_IMAGE_PIXELS = 10
|
||||
self.assertEqual(Image.MAX_IMAGE_PIXELS, 10)
|
||||
|
||||
# Act / Assert
|
||||
self.assert_warning(
|
||||
Image.DecompressionBombWarning,
|
||||
lambda: Image.new('L', (100, 100), 0))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user