Skip to content

Commit

Permalink
Rename variable "pixel" to "expected"
Browse files Browse the repository at this point in the history
Co-authored-by: Ondrej Baranovič <ondreko.tiba@gmail.com>
  • Loading branch information
Yay295 and nulano committed Apr 25, 2024
1 parent dc9673d commit c10494e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/test_image_getdata_putdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ def test_getdata_roundtrip(


@pytest.mark.parametrize(
"value, pixel",
"value, expected",
(
(0xFFFFFFFF, (255, 255, 255, 255)),
(-1, (255, 255, 255, 255)),
(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.putdata([value])
assert im.getpixel((0, 0)) == pixel
assert im.getpixel((0, 0)) == expected


def test_putdata_pypy_performance() -> None:
Expand Down

0 comments on commit c10494e

Please sign in to comment.