mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 07:57:27 +03:00 
			
		
		
		
	basic sanity test for webp
This commit is contained in:
		
							parent
							
								
									3c93da2008
								
							
						
					
					
						commit
						95353cff15
					
				
							
								
								
									
										27
									
								
								Tests/test_file_webp.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								Tests/test_file_webp.py
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,27 @@ | |||
| from tester import * | ||||
| 
 | ||||
| from PIL import Image | ||||
| 
 | ||||
| def test_sanity(): | ||||
| 
 | ||||
|     file = "Images/lena.webp" | ||||
|     im = Image.open(file) | ||||
| 
 | ||||
|     assert_equal(im.mode, "RGB") | ||||
|     assert_equal(im.size, (128, 128)) | ||||
|     assert_equal(im.format, "WEBP") | ||||
| 
 | ||||
| 
 | ||||
|     file = tempfile("temp.webp") | ||||
| 
 | ||||
|     lena("RGB").save(file) | ||||
| 
 | ||||
|     im = Image.open(file) | ||||
|     im.load() | ||||
| 
 | ||||
|     assert_equal(im.mode, "RGB") | ||||
|     assert_equal(im.size, (128, 128)) | ||||
|     assert_equal(im.format, "WEBP") | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user