We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 476b122 commit bf18e5fCopy full SHA for bf18e5f
2 files changed
Tests/test_file_cur.py
@@ -26,6 +26,7 @@ def test_invalid_file() -> None:
26
no_cursors_file = "Tests/images/no_cursors.cur"
27
28
cur = CurImagePlugin.CurImageFile(TEST_FILE)
29
+ assert cur.fp is not None
30
cur.fp.close()
31
with open(no_cursors_file, "rb") as cur.fp:
32
with pytest.raises(TypeError):
src/PIL/CurImagePlugin.py
@@ -38,6 +38,7 @@ class CurImageFile(BmpImagePlugin.BmpImageFile):
38
format_description = "Windows Cursor"
39
40
def _open(self) -> None:
41
+ assert self.fp is not None
42
offset = self.fp.tell()
43
44
# check magic
0 commit comments