mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			338 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			338 B
		
	
	
	
		
			Python
		
	
	
	
	
	
#!/usr/bin/env python
 | 
						|
import pytest
 | 
						|
from PIL import Image
 | 
						|
 | 
						|
 | 
						|
@pytest.mark.parametrize(
 | 
						|
    "test_file",
 | 
						|
    ["Tests/images/sgi_overrun_expandrowF04.bin", "Tests/images/sgi_crash.bin"],
 | 
						|
)
 | 
						|
def test_crashes(test_file):
 | 
						|
    with open(test_file, "rb") as f:
 | 
						|
        im = Image.open(f)
 | 
						|
        with pytest.raises(OSError):
 | 
						|
            im.load()
 |