rename variable "pixel" to "expected"

Co-authored-by: Ondrej Baranovič <ondreko.tiba@gmail.com>
This commit is contained in:
Yay295 2024-04-25 16:56:55 -05:00 committed by Yay295
parent 1a29485ea4
commit ce4ead7d8c

View File

@ -62,17 +62,17 @@ def test_getdata_roundtrip(
@pytest.mark.parametrize( @pytest.mark.parametrize(
"value, pixel", "value, expected",
( (
(0xFFFFFFFF, (255, 255, 255, 255)), (0xFFFFFFFF, (255, 255, 255, 255)),
(-1, (255, 255, 255, 255)), (-1, (255, 255, 255, 255)),
(sys.maxsize, (255, 255, 255, 255 if sys.maxsize > 2**32 else 127)), (sys.maxsize, (255, 255, 255, 255 if sys.maxsize > 2**32 else 127)),
), ),
) )
def test_putdata_long_integers(value: int, pixel: tuple[int, int, int, int]) -> None: def test_putdata_long_integers(value: int, expected: tuple[int, int, int, int]) -> None:
im = Image.new("RGBA", (1, 1)) im = Image.new("RGBA", (1, 1))
im.putdata([value]) im.putdata([value])
assert im.getpixel((0, 0)) == pixel assert im.getpixel((0, 0)) == expected
def test_putdata_pypy_performance() -> None: def test_putdata_pypy_performance() -> None: