Skip to content

Commit

Permalink
Updated tests now that alpha_only is keyword-only
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Jun 14, 2023
1 parent 044de40 commit 119a0df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/test_image_getbbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ def check(im, fill_color):
@pytest.mark.parametrize("mode", ("RGBA", "RGBa", "La", "LA", "PA"))
def test_bbox_alpha_only_false(mode):
im = Image.new(mode, (100, 100))
assert im.getbbox(False) is None
assert im.getbbox(alpha_only=False) is None

fill_color = [1] * Image.getmodebands(mode)
fill_color[-1] = 0
im.paste(tuple(fill_color), (25, 25, 75, 75))
assert im.getbbox(False) == (25, 25, 75, 75)
assert im.getbbox(alpha_only=False) == (25, 25, 75, 75)

assert im.getbbox() is None

0 comments on commit 119a0df

Please sign in to comment.