File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 7
7
import packaging
8
8
import pytest
9
9
10
- from PIL import Image , UnidentifiedImageError , features
10
+ from PIL import Image , features
11
11
from Tests .helper import skip_unless_feature
12
12
13
13
if sys .platform .startswith ("win32" ):
@@ -32,21 +32,17 @@ def test_fuzz_images(path: str) -> None:
32
32
fuzzers .fuzz_image (f .read ())
33
33
assert True
34
34
except (
35
+ # Known exceptions from Pillow
35
36
OSError ,
36
37
SyntaxError ,
37
38
MemoryError ,
38
39
ValueError ,
39
40
NotImplementedError ,
40
41
OverflowError ,
41
- ):
42
- # Known exceptions that are through from Pillow
43
- assert True
44
- except (
42
+ # Known Image.* exceptions
45
43
Image .DecompressionBombError ,
46
44
Image .DecompressionBombWarning ,
47
- UnidentifiedImageError ,
48
45
):
49
- # Known Image.* exceptions
50
46
assert True
51
47
finally :
52
48
fuzzers .disable_decompressionbomb_error ()
You can’t perform that action at this time.
0 commit comments