Skip to content

Commit db5bfe8

Browse files
committed
Catch error
1 parent 629c9bf commit db5bfe8

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Tests/test_file_dds.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
assert_image_similar,
1616
assert_image_similar_tofile,
1717
hopper,
18-
timeout_unless_slower_valgrind,
1918
)
2019

2120
TEST_FILE_DXT1 = "Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.dds"
@@ -543,7 +542,6 @@ def test_save_large_file(tmp_path: Path, pixel_format: str, mode: str) -> None:
543542
im.save(tmp_path / "img.dds", pixel_format=pixel_format)
544543

545544

546-
@timeout_unless_slower_valgrind(1)
547545
@pytest.mark.parametrize(
548546
"test_file",
549547
[
@@ -553,6 +551,7 @@ def test_save_large_file(tmp_path: Path, pixel_format: str, mode: str) -> None:
553551
"Tests/images/timeout-c60a3d7314213624607bfb3e38d551a8b24a7435.dds",
554552
],
555553
)
556-
def test_timeout(test_file) -> None:
554+
def test_not_enough_image_data(test_file: str) -> None:
557555
with Image.open(test_file) as im:
558-
im.load()
556+
with pytest.raises(ValueError, match="not enough image data"):
557+
im.load()

0 commit comments

Comments
 (0)