mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-04 20:03:20 +03:00
Updated tests now that alpha_only is keyword-only
This commit is contained in:
parent
044de40c93
commit
119a0dfb01
|
@ -45,11 +45,11 @@ def test_bbox():
|
||||||
@pytest.mark.parametrize("mode", ("RGBA", "RGBa", "La", "LA", "PA"))
|
@pytest.mark.parametrize("mode", ("RGBA", "RGBa", "La", "LA", "PA"))
|
||||||
def test_bbox_alpha_only_false(mode):
|
def test_bbox_alpha_only_false(mode):
|
||||||
im = Image.new(mode, (100, 100))
|
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] * Image.getmodebands(mode)
|
||||||
fill_color[-1] = 0
|
fill_color[-1] = 0
|
||||||
im.paste(tuple(fill_color), (25, 25, 75, 75))
|
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
|
assert im.getbbox() is None
|
||||||
|
|
Loading…
Reference in New Issue
Block a user