mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 02:16:19 +03:00
ad784eb808
This is Christoph Gohlke's test suite from his personal PIL package found at http://www.lfd.uci.edu/~gohlke/pythonlibs/. This is just to bring it in as a separate commit. Future commits will align it with Pillow.
17 lines
493 B
Python
17 lines
493 B
Python
from tester import *
|
|
|
|
from PIL import Image
|
|
|
|
def test_offset():
|
|
|
|
im1 = lena()
|
|
|
|
im2 = assert_warning(DeprecationWarning, lambda: im1.offset(10))
|
|
assert_equal(im1.getpixel((0, 0)), im2.getpixel((10, 10)))
|
|
|
|
im2 = assert_warning(DeprecationWarning, lambda: im1.offset(10, 20))
|
|
assert_equal(im1.getpixel((0, 0)), im2.getpixel((10, 20)))
|
|
|
|
im2 = assert_warning(DeprecationWarning, lambda: im1.offset(20, 20))
|
|
assert_equal(im1.getpixel((0, 0)), im2.getpixel((20, 20)))
|