Improved comment

This commit is contained in:
Andrew Murray 2025-01-14 21:03:20 +11:00
parent f521a4be7d
commit 0f2c554c69

View File

@ -32,21 +32,18 @@ def test_fuzz_images(path: str) -> None:
fuzzers.fuzz_image(f.read()) fuzzers.fuzz_image(f.read())
assert True assert True
except ( except (
# Known exceptions from Pillow
OSError, OSError,
SyntaxError, SyntaxError,
MemoryError, MemoryError,
ValueError, ValueError,
NotImplementedError, NotImplementedError,
OverflowError, OverflowError,
): # Known Image.* exceptions
# Known exceptions that are through from Pillow
assert True
except (
Image.DecompressionBombError, Image.DecompressionBombError,
Image.DecompressionBombWarning, Image.DecompressionBombWarning,
UnidentifiedImageError, UnidentifiedImageError,
): ):
# Known Image.* exceptions
assert True assert True
finally: finally:
fuzzers.disable_decompressionbomb_error() fuzzers.disable_decompressionbomb_error()