add test for autocontrast mode

This commit is contained in:
Yay295 2023-10-23 21:47:56 -05:00 committed by Yay295
commit 5295df3b82

View File

@ -433,6 +433,12 @@ def test_exif_transpose_in_place():
assert_image_equal(im, expected)
def test_autocontrast_unsupported_mode():
im = Image.new("RGBA", (1, 1))
with pytest.raises(OSError):
ImageOps.autocontrast(im)
def test_autocontrast_cutoff():
# Test the cutoff argument of autocontrast
with Image.open("Tests/images/bw_gradient.png") as img: