From 4d51a410d8b237c9e284a6ccc62ad84226fd4c50 Mon Sep 17 00:00:00 2001 From: Marco De Donno Date: Tue, 5 Jul 2016 20:46:47 +0200 Subject: [PATCH] Add the test for factor = 1 and -1 --- Tests/test_imageops.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Tests/test_imageops.py b/Tests/test_imageops.py index 47daef334..6873b6e11 100644 --- a/Tests/test_imageops.py +++ b/Tests/test_imageops.py @@ -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))