mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-01 00:17:27 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			660 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			660 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from helper import unittest, PillowTestCase, lena
 | |
| 
 | |
| from PIL import Image
 | |
| from PIL import ImageEnhance
 | |
| 
 | |
| 
 | |
| class TestImageEnhance(PillowTestCase):
 | |
| 
 | |
|     def test_sanity(self):
 | |
| 
 | |
|         # FIXME: assert_image
 | |
|         # Implicit asserts no exception:
 | |
|         ImageEnhance.Color(lena()).enhance(0.5)
 | |
|         ImageEnhance.Contrast(lena()).enhance(0.5)
 | |
|         ImageEnhance.Brightness(lena()).enhance(0.5)
 | |
|         ImageEnhance.Sharpness(lena()).enhance(0.5)
 | |
| 
 | |
|     def test_crash(self):
 | |
| 
 | |
|         # crashes on small images
 | |
|         im = Image.new("RGB", (1, 1))
 | |
|         ImageEnhance.Sharpness(im).enhance(0.5)
 | |
| 
 | |
| 
 | |
| if __name__ == '__main__':
 | |
|     unittest.main()
 | |
| 
 | |
| # End of file
 |