Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Pillow / Tests / test_image_frombytes.py
Size: Mime:
from helper import unittest, PillowTestCase, hopper

from PIL import Image


class TestImageFromBytes(PillowTestCase):

    def test_sanity(self):
        im1 = hopper()
        im2 = Image.frombytes(im1.mode, im1.size, im1.tobytes())

        self.assert_image_equal(im1, im2)

    def test_not_implemented(self):
        self.assertRaises(NotImplementedError, Image.fromstring)


if __name__ == '__main__':
    unittest.main()