mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 18:07:51 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			351 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			351 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from __future__ import annotations
 | 
						|
 | 
						|
import pytest
 | 
						|
 | 
						|
from .helper import assert_image_equal, fromstring, hopper
 | 
						|
 | 
						|
 | 
						|
def test_sanity() -> None:
 | 
						|
    with pytest.raises(ValueError):
 | 
						|
        hopper().tobitmap()
 | 
						|
 | 
						|
    im1 = hopper().convert("1")
 | 
						|
 | 
						|
    bitmap = im1.tobitmap()
 | 
						|
 | 
						|
    assert isinstance(bitmap, bytes)
 | 
						|
    assert_image_equal(im1, fromstring(bitmap))
 |