mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-04 21:50:54 +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 crop(mode):
|
||||
out = hopper(mode).crop((50, 50, 100, 100))
|
||||
self.assertEqual(out.mode, mode)
|
||||
self.assertEqual(out.size, (50, 50))
|
||||
im = hopper(mode)
|
||||
self.assert_image_equal(im.crop(), im)
|
||||
|
||||
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":
|
||||
crop(mode)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user