Skip to content

Conversation

@radarhere
Copy link
Member

At https://app.codecov.io/gh/python-pillow/Pillow/blob/main/Tests%2Ftest_file_spider.py, you can see that the last line of

def test_nonstack_dos() -> None:
with Image.open(TEST_FILE) as im:
for i, frame in enumerate(ImageSequence.Iterator(im)):
assert i <= 1, "Non-stack DOS file test failed"

is not covered.

It is testing

def seek(self, frame: int) -> None:
if self.istack == 0:
msg = "attempt to seek in a non-stack file"
raise EOFError(msg)

This PR changes the test to directly call seek(), so all test lines are run, and test coverage is improved.

@hugovk hugovk merged commit bd4fd58 into python-pillow:main Jan 8, 2025
49 checks passed
@radarhere radarhere deleted the spider_test branch January 8, 2025 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants