mirror of
https://github.com/python-pillow/Pillow.git
synced 2026-02-04 14:35:54 +03:00
add a selection of test cases from oss-fuzz
This commit is contained in:
parent
f15886a4dd
commit
020f890373
|
|
@ -15,6 +15,7 @@ from .helper import (
|
|||
assert_image_similar,
|
||||
assert_image_similar_tofile,
|
||||
hopper,
|
||||
timeout_unless_slower_valgrind,
|
||||
)
|
||||
|
||||
TEST_FILE_DXT1 = "Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.dds"
|
||||
|
|
@ -540,3 +541,18 @@ def test_save_large_file(tmp_path: Path, pixel_format: str, mode: str) -> None:
|
|||
im = hopper(mode).resize((440, 440))
|
||||
# should not error in valgrind
|
||||
im.save(tmp_path / "img.dds", pixel_format=pixel_format)
|
||||
|
||||
|
||||
@timeout_unless_slower_valgrind(1)
|
||||
@pytest.mark.parametrize(
|
||||
"test_file",
|
||||
[
|
||||
"Tests/images/timeout-041dd17dfde800360a47a172269df127af138c6b.dds",
|
||||
"Tests/images/timeout-755a4d204f4208e3597ac3391edebee196462bd0.dds",
|
||||
"Tests/images/timeout-52d106579505547091ef69b58341351a37c23e31.dds",
|
||||
"Tests/images/timeout-c60a3d7314213624607bfb3e38d551a8b24a7435.dds",
|
||||
],
|
||||
)
|
||||
def test_timeout(test_file) -> None:
|
||||
with Image.open(test_file) as im:
|
||||
im.load()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user