~ubuntu-branches/ubuntu/saucy/python-imaging/saucy-proposed

« back to all changes in this revision

Viewing changes to Tests/test_image_offset.py

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-01-31 20:49:20 UTC
  • mfrom: (27.1.1 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20130131204920-b5zshy6vgfvdionl
Tags: 1.1.7+1.7.8-1ubuntu1
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_offset():
 
6
    
 
7
    im1 = lena()
 
8
 
 
9
    im2 = assert_warning(DeprecationWarning, lambda: im1.offset(10))
 
10
    assert_equal(im1.getpixel((0, 0)), im2.getpixel((10, 10)))
 
11
 
 
12
    im2 = assert_warning(DeprecationWarning, lambda: im1.offset(10, 20))
 
13
    assert_equal(im1.getpixel((0, 0)), im2.getpixel((10, 20)))
 
14
 
 
15
    im2 = assert_warning(DeprecationWarning, lambda: im1.offset(20, 20))
 
16
    assert_equal(im1.getpixel((0, 0)), im2.getpixel((20, 20)))