Skip to content

Commit 5b677ca

Browse files
committed
Assert palette is not None
1 parent b71109d commit 5b677ca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Tests/test_imagedraw.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,12 @@ def test_sanity() -> None:
7171
def test_new_color() -> None:
7272
with Image.open("Tests/images/chi.gif") as im:
7373
draw = ImageDraw.Draw(im)
74+
assert im.palette is not None
7475
assert len(im.palette.colors) == 249
7576

7677
# Test drawing a new color onto the palette
7778
draw.line((0, 0), fill=(0, 0, 0))
79+
assert im.palette is not None
7880
assert len(im.palette.colors) == 250
7981
assert im.palette.dirty
8082

0 commit comments

Comments
 (0)