Improved SPIDER test coverage by radarhere · Pull Request #8668 · python-pillow/Pillow

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.