From a3da70e76e14da1bc0e5b1c2331d746e4a095a6b Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 12 Apr 2025 14:23:58 +1000 Subject: [PATCH] Assert load() does not return None --- Tests/test_file_gif.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py index f46a28971..e418af45c 100644 --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -1481,7 +1481,9 @@ def test_saving_rgba(tmp_path: Path) -> None: with Image.open(out) as reloaded: reloaded_rgba = reloaded.convert("RGBA") - value = reloaded_rgba.load()[0, 0] + px = reloaded_rgba.load() + assert px is not None + value = px[0, 0] assert isinstance(value, tuple) assert value[3] == 0