mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Failing test case for #2259
This commit is contained in:
parent
badc3ec1f3
commit
310105625c
|
@ -204,6 +204,14 @@ class TestNumpy(PillowTestCase):
|
|||
|
||||
self.assertEqual(len(im.getdata()), len(arr))
|
||||
|
||||
def test_zero_size(self):
|
||||
# Shouldn't cause floating point exception
|
||||
# See https://github.com/python-pillow/Pillow/issues/2259
|
||||
|
||||
im = Image.fromarray(numpy.empty((0, 0), dtype=numpy.uint8))
|
||||
|
||||
self.assertEqual(im.size, (0, 0))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in New Issue
Block a user