Pillow/Tests/test_image_copy.py

21 lines
453 B
Python
Raw Normal View History

from helper import unittest, PillowTestCase, hopper
from PIL import Image
2014-06-10 13:10:47 +04:00
class TestImageCopy(PillowTestCase):
def test_copy(self):
def copy(mode):
im = hopper(mode)
2014-06-10 13:10:47 +04:00
out = im.copy()
self.assertEqual(out.mode, mode)
self.assertEqual(out.size, im.size)
for mode in "1", "P", "L", "RGB", "I", "F":
copy(mode)
if __name__ == '__main__':
unittest.main()
# End of file