Clean up comments and filters

This commit is contained in:
Eric Soroos 2021-03-15 00:18:07 +01:00
parent d45247eb66
commit 83dabda6b2
2 changed files with 3 additions and 3 deletions

View File

@ -20,12 +20,12 @@ def fuzz_image(data):
def fuzz_font(data):
# This should not fail on a valid font load for any of the fonts in the corpus
wrapper = io.BytesIO(data)
try:
font = ImageFont.truetype(wrapper)
except OSError:
# pcf/pilfonts/random garbage here here. They're different.
# Catch pcf/pilfonts/random garbage here. They return
# different font objects.
return
font.getsize_multiline("ABC\nAaaa")

View File

@ -43,7 +43,7 @@ def test_fuzz_images(path):
"path", subprocess.check_output("find Tests/fonts -type f", shell=True).split(b"\n")
)
def test_fuzz_fonts(path):
if not path or b"LICENSE.txt" in path or b".pil" in path:
if not path:
return
with open(path, "rb") as f:
fuzzers.fuzz_font(f.read())