mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 16:07:30 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			425 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			425 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from helper import unittest, PillowTestCase, hopper, fromstring
 | |
| 
 | |
| 
 | |
| class TestImageToBitmap(PillowTestCase):
 | |
| 
 | |
|     def test_sanity(self):
 | |
| 
 | |
|         self.assertRaises(ValueError, lambda: hopper().tobitmap())
 | |
| 
 | |
|         im1 = hopper().convert("1")
 | |
| 
 | |
|         bitmap = im1.tobitmap()
 | |
| 
 | |
|         self.assertIsInstance(bitmap, bytes)
 | |
|         self.assert_image_equal(im1, fromstring(bitmap))
 | |
| 
 | |
| 
 | |
| if __name__ == '__main__':
 | |
|     unittest.main()
 |