diff --git a/Tests/test_box_blur.py b/Tests/test_box_blur.py index 622b842d0..2787dfc0d 100644 --- a/Tests/test_box_blur.py +++ b/Tests/test_box_blur.py @@ -1,6 +1,6 @@ from helper import unittest, PillowTestCase -from PIL import Image, ImageOps +from PIL import Image, ImageFilter sample = Image.new("L", (7, 5)) @@ -16,7 +16,7 @@ sample.putdata(sum([ class TestBoxBlurApi(PillowTestCase): def test_imageops_box_blur(self): - i = ImageOps.box_blur(sample, 1) + i = sample.filter(ImageFilter.BoxBlur(1)) self.assertEqual(i.mode, sample.mode) self.assertEqual(i.size, sample.size) self.assertIsInstance(i, Image.Image) diff --git a/Tests/test_imageops_usm.py b/Tests/test_imageops_usm.py index 3fb021fe7..2666d3482 100644 --- a/Tests/test_imageops_usm.py +++ b/Tests/test_imageops_usm.py @@ -17,6 +17,11 @@ class TestImageOpsUsm(PillowTestCase): self.assertEqual(i.mode, "RGB") self.assertEqual(i.size, (128, 128)) + i = self.assert_warning(DeprecationWarning, + ImageOps.box_blur, im, 1) + self.assertEqual(i.mode, "RGB") + self.assertEqual(i.size, (128, 128)) + i = self.assert_warning(DeprecationWarning, ImageOps.gblur, im, 2.0) self.assertEqual(i.mode, "RGB")