mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 16:07:30 +03:00 
			
		
		
		
	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 {} \;
		
	
			
		
			
				
	
	
		
			17 lines
		
	
	
		
			489 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			489 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)))
 |