mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	Added test for crop operation with no argument
This commit is contained in:
		
							parent
							
								
									296fb5fe1d
								
							
						
					
					
						commit
						c5265e2100
					
				| 
						 | 
					@ -7,9 +7,12 @@ class TestImageCrop(PillowTestCase):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_crop(self):
 | 
					    def test_crop(self):
 | 
				
			||||||
        def crop(mode):
 | 
					        def crop(mode):
 | 
				
			||||||
            out = hopper(mode).crop((50, 50, 100, 100))
 | 
					            im = hopper(mode)
 | 
				
			||||||
            self.assertEqual(out.mode, mode)
 | 
					            self.assert_image_equal(im.crop(), im)
 | 
				
			||||||
            self.assertEqual(out.size, (50, 50))
 | 
					
 | 
				
			||||||
 | 
					            cropped = im.crop((50, 50, 100, 100))
 | 
				
			||||||
 | 
					            self.assertEqual(cropped.mode, mode)
 | 
				
			||||||
 | 
					            self.assertEqual(cropped.size, (50, 50))
 | 
				
			||||||
        for mode in "1", "P", "L", "RGB", "I", "F":
 | 
					        for mode in "1", "P", "L", "RGB", "I", "F":
 | 
				
			||||||
            crop(mode)
 | 
					            crop(mode)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user