Skip to content

Commit

Permalink
Improved coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Jan 1, 2025
1 parent 6b75e06 commit 5d998d3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Tests/test_file_blp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import pytest

from PIL import Image
from PIL import BlpImagePlugin, Image

from .helper import (
assert_image_equal,
Expand Down Expand Up @@ -38,6 +38,13 @@ def test_load_blp2_dxt1a() -> None:
assert_image_equal_tofile(im, "Tests/images/blp/blp2_dxt1a.png")


def test_invalid_file() -> None:
invalid_file = "Tests/images/flower.jpg"

with pytest.raises(BlpImagePlugin.BLPFormatError):
BlpImagePlugin.BlpImageFile(invalid_file)


def test_save(tmp_path: Path) -> None:
f = str(tmp_path / "temp.blp")

Expand Down

0 comments on commit 5d998d3

Please sign in to comment.