mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 07:57:27 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			385 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			385 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from PIL import Image
 | |
| 
 | |
| from .helper import PillowTestCase, assert_image_equal, hopper
 | |
| 
 | |
| 
 | |
| class TestImageFromBytes(PillowTestCase):
 | |
|     def test_sanity(self):
 | |
|         im1 = hopper()
 | |
|         im2 = Image.frombytes(im1.mode, im1.size, im1.tobytes())
 | |
| 
 | |
|         assert_image_equal(im1, im2)
 | |
| 
 | |
|     def test_not_implemented(self):
 | |
|         self.assertRaises(NotImplementedError, Image.fromstring)
 |