Skip to content

Commit 5575c1d

Browse files
committed
Test missing frame size
1 parent e946c7b commit 5575c1d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Tests/test_file_fli.py

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import io
34
import warnings
45

56
import pytest
@@ -132,6 +133,15 @@ def test_eoferror() -> None:
132133
im.seek(n_frames - 1)
133134

134135

136+
def test_missing_frame_size() -> None:
137+
with open(animated_test_file, "rb") as fp:
138+
data = fp.read()
139+
data = data[:6188]
140+
with Image.open(io.BytesIO(data)) as im:
141+
with pytest.raises(EOFError, match="missing frame size"):
142+
im.seek(1)
143+
144+
135145
def test_seek_tell() -> None:
136146
with Image.open(animated_test_file) as im:
137147
layer_number = im.tell()

0 commit comments

Comments
 (0)