mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	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.
		
			
				
	
	
		
			29 lines
		
	
	
		
			547 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			547 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))
 | 
						|
 |