mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-04 21:50:54 +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))
|
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__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user