Pillow/Tests/test_image_frombytes.py

19 lines
342 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 TestImageFromBytes(PillowTestCase):
2014-06-10 13:10:47 +04:00
def test_sanity(self):
im1 = hopper()
2014-06-10 13:10:47 +04:00
im2 = Image.frombytes(im1.mode, im1.size, im1.tobytes())
self.assert_image_equal(im1, im2)
if __name__ == '__main__':
unittest.main()
# End of file