mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	Clean up comments and filters
This commit is contained in:
		
							parent
							
								
									d45247eb66
								
							
						
					
					
						commit
						83dabda6b2
					
				| 
						 | 
				
			
			@ -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")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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())
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user