mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Test mandelbrot with bad arguments
This commit is contained in:
parent
ed85a03db0
commit
3a9612af50
|
@ -155,6 +155,19 @@ class TestImage(PillowTestCase):
|
|||
im2 = Image.open('Tests/images/effect_mandelbrot.png')
|
||||
self.assert_image_equal(im, im2)
|
||||
|
||||
def test_effect_mandelbrot_bad_arguments(self):
|
||||
# Arrange
|
||||
size = (512, 512)
|
||||
# Get coordinates the wrong way round:
|
||||
extent = (+3, +2.5, -2, -2.5)
|
||||
# Quality < 2:
|
||||
quality = 1
|
||||
|
||||
# Act/Assert
|
||||
self.assertRaises(
|
||||
ValueError,
|
||||
lambda: Image.effect_mandelbrot(size, extent, quality))
|
||||
|
||||
@unittest.skipUnless(sys.platform.startswith('win32'),
|
||||
"Stalls on Travis CI, passes on Windows")
|
||||
def test_effect_noise(self):
|
||||
|
|
|
@ -139,9 +139,9 @@ ImagingEffectSpread(Imaging imIn, int distance)
|
|||
}
|
||||
|
||||
if (imIn->image8) {
|
||||
SPREAD(UINT8, image8);
|
||||
SPREAD(UINT8, image8);
|
||||
} else {
|
||||
SPREAD(INT32, image32);
|
||||
SPREAD(INT32, image32);
|
||||
}
|
||||
|
||||
ImagingCopyInfo(imOut, imIn);
|
||||
|
|
Loading…
Reference in New Issue
Block a user