mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-30 23:47:27 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			308 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			308 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import pytest
 | |
| 
 | |
| from .helper import assert_image_equal, fromstring, hopper
 | |
| 
 | |
| 
 | |
| def test_sanity():
 | |
| 
 | |
|     with pytest.raises(ValueError):
 | |
|         hopper().tobitmap()
 | |
| 
 | |
|     im1 = hopper().convert("1")
 | |
| 
 | |
|     bitmap = im1.tobitmap()
 | |
| 
 | |
|     assert isinstance(bitmap, bytes)
 | |
|     assert_image_equal(im1, fromstring(bitmap))
 |