Pillow/Tests/test_imagedraw.py
Alex Clark bb1b3a532c Cleanup WS, courtesy of @Arfrever
find * -type f "-(" -name "*.bdf" -o -name "*.c" -o -name "*.h" -o -name "*.py" -o -name "*.rst" -o -name "*.txt" "-)" -exec sed -e "s/[[:space:]]*$//" -i {} \;
2013-06-30 18:42:19 -04:00

29 lines
543 B
Python

from tester import *
from PIL import Image
from PIL import ImageDraw
def test_sanity():
im = lena("RGB").copy()
draw = ImageDraw.ImageDraw(im)
draw = ImageDraw.Draw(im)
draw.ellipse(list(range(4)))
draw.line(list(range(10)))
draw.polygon(list(range(100)))
draw.rectangle(list(range(4)))
success()
def test_deprecated():
im = lena().copy()
draw = ImageDraw.Draw(im)
assert_warning(DeprecationWarning, lambda: draw.setink(0))
assert_warning(DeprecationWarning, lambda: draw.setfill(0))