Skip to content

Commit 5295df3

Browse files
committed
add test for autocontrast mode
2 parents 6ddf10c + f54dd84 commit 5295df3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Tests/test_imageops.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,12 @@ def test_exif_transpose_in_place():
433433
assert_image_equal(im, expected)
434434

435435

436+
def test_autocontrast_unsupported_mode():
437+
im = Image.new("RGBA", (1, 1))
438+
with pytest.raises(OSError):
439+
ImageOps.autocontrast(im)
440+
441+
436442
def test_autocontrast_cutoff():
437443
# Test the cutoff argument of autocontrast
438444
with Image.open("Tests/images/bw_gradient.png") as img:

0 commit comments

Comments
 (0)