Add the test for factor = 1 and -1

This commit is contained in:
Marco De Donno 2016-07-05 20:46:47 +02:00
parent 7af3c4c3bc
commit 4d51a410d8

View File

@ -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))