Skip to content

Commit 84d58a0

Browse files
authored
Merge pull request #8694 from radarhere/exceptions
2 parents bdfd881 + cf438c5 commit 84d58a0

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Tests/oss-fuzz/test_fuzzers.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import packaging
88
import pytest
99

10-
from PIL import Image, UnidentifiedImageError, features
10+
from PIL import Image, features
1111
from Tests.helper import skip_unless_feature
1212

1313
if sys.platform.startswith("win32"):
@@ -32,21 +32,17 @@ def test_fuzz_images(path: str) -> None:
3232
fuzzers.fuzz_image(f.read())
3333
assert True
3434
except (
35+
# Known exceptions from Pillow
3536
OSError,
3637
SyntaxError,
3738
MemoryError,
3839
ValueError,
3940
NotImplementedError,
4041
OverflowError,
41-
):
42-
# Known exceptions that are through from Pillow
43-
assert True
44-
except (
42+
# Known Image.* exceptions
4543
Image.DecompressionBombError,
4644
Image.DecompressionBombWarning,
47-
UnidentifiedImageError,
4845
):
49-
# Known Image.* exceptions
5046
assert True
5147
finally:
5248
fuzzers.disable_decompressionbomb_error()

0 commit comments

Comments
 (0)