~ubuntu-branches/ubuntu/wily/python-imaging/wily

« back to all changes in this revision

Viewing changes to Tests/test_image_fromstring.py

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-01-31 20:49:20 UTC
  • mfrom: (1.1.4)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130131204920-7tnuhqhlsqdza4c2
Rewrite build dependencies to allow cross builds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from tester import *
 
2
 
 
3
from PIL import Image
 
4
 
 
5
def test_sanity():
 
6
 
 
7
    im1 = lena()
 
8
    im2 = None
 
9
 
 
10
    if py3:
 
11
        im2 = Image.frombytes(im1.mode, im1.size, im1.tobytes())
 
12
    else:
 
13
        im2 = Image.fromstring(im1.mode, im1.size, im1.tostring())
 
14
 
 
15
    assert_image_equal(im1, im2)
 
16