Skip to content

Commit

Permalink
add test for autocontract mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Yay295 committed Oct 24, 2023
2 parents 6ddf10c + f54dd84 commit a023be5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Tests/test_imageops.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a023be5

Please sign in to comment.