From ab1835df5ca784e23b99703140967985af4267ba Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 5 Apr 2020 15:29:13 +1000 Subject: [PATCH] Assert that seeking too far raises an EOFError --- Tests/test_file_png.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py index 469d186e8..476995dd7 100644 --- a/Tests/test_file_png.py +++ b/Tests/test_file_png.py @@ -637,6 +637,9 @@ class TestFilePng: with Image.open(TEST_PNG_FILE) as im: im.seek(0) + with pytest.raises(EOFError): + im.seek(1) + @pytest.mark.skipif(is_win32(), reason="Requires Unix or macOS") @skip_unless_feature("zlib")