mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 07:57:27 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			381 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			381 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from .helper import PillowTestCase, assert_image_equal, fromstring, hopper
 | |
| 
 | |
| 
 | |
| class TestImageToBitmap(PillowTestCase):
 | |
|     def test_sanity(self):
 | |
| 
 | |
|         self.assertRaises(ValueError, lambda: hopper().tobitmap())
 | |
| 
 | |
|         im1 = hopper().convert("1")
 | |
| 
 | |
|         bitmap = im1.tobitmap()
 | |
| 
 | |
|         self.assertIsInstance(bitmap, bytes)
 | |
|         assert_image_equal(im1, fromstring(bitmap))
 |