From 8d31625ba88bf878ea03d358f6a38135929c7d9c Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 28 Jun 2025 14:08:15 +1000 Subject: [PATCH] Assert getpixel returns tuple --- Tests/test_file_avif.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/test_file_avif.py b/Tests/test_file_avif.py index 3fac51ac6..8b6d39b1c 100644 --- a/Tests/test_file_avif.py +++ b/Tests/test_file_avif.py @@ -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