mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 09:26:16 +03:00
Add the test for factor = 1 and -1
This commit is contained in:
parent
7af3c4c3bc
commit
4d51a410d8
|
@ -81,7 +81,13 @@ class TestImageOps(PillowTestCase):
|
|||
def test_scale(self):
|
||||
# Test the scaling function
|
||||
i = hopper("L").resize((50,50))
|
||||
|
||||
|
||||
with self.assertRaises(ValueError):
|
||||
ImageOps.scale(i,-1)
|
||||
|
||||
newimg = ImageOps.scale(i,1)
|
||||
self.assertEqual(newimg.size, (50, 50))
|
||||
|
||||
newimg = ImageOps.scale(i,2)
|
||||
self.assertEqual(newimg.size, (100, 100))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user