mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
21 lines
449 B
Python
21 lines
449 B
Python
from helper import unittest, PillowTestCase, lena
|
|
|
|
from PIL import Image
|
|
|
|
|
|
class TestImageCopy(PillowTestCase):
|
|
|
|
def test_copy(self):
|
|
def copy(mode):
|
|
im = lena(mode)
|
|
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
|