mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 07:57:27 +03:00 
			
		
		
		
	The unittest in helper.py has not offered an interesting abstraction
since dbe9f85c7d so import from the more
typical stdlib location.
		
	
			
		
			
				
	
	
		
			19 lines
		
	
	
		
			364 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			364 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import unittest
 | |
| 
 | |
| from PIL import Image
 | |
| 
 | |
| from .helper import PillowTestCase
 | |
| 
 | |
| 
 | |
| class TestJ2kEncodeOverflow(PillowTestCase):
 | |
|     def test_j2k_overflow(self):
 | |
| 
 | |
|         im = Image.new("RGBA", (1024, 131584))
 | |
|         target = self.tempfile("temp.jpc")
 | |
|         with self.assertRaises(IOError):
 | |
|             im.save(target)
 | |
| 
 | |
| 
 | |
| if __name__ == "__main__":
 | |
|     unittest.main()
 |