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 6b75e06 commit 5d998d3Copy full SHA for 5d998d3
1 file changed
Tests/test_file_blp.py
@@ -4,7 +4,7 @@
4
5
import pytest
6
7
-from PIL import Image
+from PIL import BlpImagePlugin, Image
8
9
from .helper import (
10
assert_image_equal,
@@ -38,6 +38,13 @@ def test_load_blp2_dxt1a() -> None:
38
assert_image_equal_tofile(im, "Tests/images/blp/blp2_dxt1a.png")
39
40
41
+def test_invalid_file() -> None:
42
+ invalid_file = "Tests/images/flower.jpg"
43
+
44
+ with pytest.raises(BlpImagePlugin.BLPFormatError):
45
+ BlpImagePlugin.BlpImageFile(invalid_file)
46
47
48
def test_save(tmp_path: Path) -> None:
49
f = str(tmp_path / "temp.blp")
50
0 commit comments