Pillow/Tests/test_image_resize.py

20 lines
477 B
Python
Raw Normal View History

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