mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-11 16:52:29 +03:00
Assert getpixel returns tuple
This commit is contained in:
parent
a370209fea
commit
8d31625ba8
|
@ -220,6 +220,7 @@ class TestFileAvif:
|
|||
def test_background_from_gif(self, tmp_path: Path) -> None:
|
||||
with Image.open("Tests/images/chi.gif") as im:
|
||||
original_value = im.convert("RGB").getpixel((1, 1))
|
||||
assert isinstance(original_value, tuple)
|
||||
|
||||
# Save as AVIF
|
||||
out_avif = tmp_path / "temp.avif"
|
||||
|
@ -232,6 +233,7 @@ class TestFileAvif:
|
|||
|
||||
with Image.open(out_gif) as reread:
|
||||
reread_value = reread.convert("RGB").getpixel((1, 1))
|
||||
assert isinstance(reread_value, tuple)
|
||||
difference = sum([abs(original_value[i] - reread_value[i]) for i in range(3)])
|
||||
assert difference <= 6
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user