mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	Added tests
This commit is contained in:
		
							parent
							
								
									6f44ae1d27
								
							
						
					
					
						commit
						e3675f95fb
					
				| 
						 | 
					@ -64,6 +64,10 @@ class TestFileIcns(PillowTestCase):
 | 
				
			||||||
            self.assertEqual(im2.mode, 'RGBA')
 | 
					            self.assertEqual(im2.mode, 'RGBA')
 | 
				
			||||||
            self.assertEqual(im2.size, (wr, hr))
 | 
					            self.assertEqual(im2.size, (wr, hr))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Check that we cannot load an incorrect size
 | 
				
			||||||
 | 
					        with self.assertRaises(ValueError):
 | 
				
			||||||
 | 
					            im.size = (1, 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_older_icon(self):
 | 
					    def test_older_icon(self):
 | 
				
			||||||
        # This icon was made with Icon Composer rather than iconutil; it still
 | 
					        # This icon was made with Icon Composer rather than iconutil; it still
 | 
				
			||||||
        # uses PNG rather than JP2, however (since it was made on 10.9).
 | 
					        # uses PNG rather than JP2, however (since it was made on 10.9).
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -47,6 +47,11 @@ class TestFileIco(PillowTestCase):
 | 
				
			||||||
        self.assert_image_equal(reloaded,
 | 
					        self.assert_image_equal(reloaded,
 | 
				
			||||||
                                hopper().resize((32, 32), Image.LANCZOS))
 | 
					                                hopper().resize((32, 32), Image.LANCZOS))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def test_incorrect_size(self):
 | 
				
			||||||
 | 
					        im = Image.open(TEST_ICO_FILE)
 | 
				
			||||||
 | 
					        with self.assertRaises(ValueError):
 | 
				
			||||||
 | 
					            im.size = (1, 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_save_256x256(self):
 | 
					    def test_save_256x256(self):
 | 
				
			||||||
        """Issue #2264 https://github.com/python-pillow/Pillow/issues/2264"""
 | 
					        """Issue #2264 https://github.com/python-pillow/Pillow/issues/2264"""
 | 
				
			||||||
        # Arrange
 | 
					        # Arrange
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user