mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +03:00
Cleaning out prints, reenabling bad/questionable
This commit is contained in:
parent
6de70524f7
commit
14175b786d
|
@ -10,27 +10,25 @@ def get_files(d, ext='.bmp'):
|
||||||
return [os.path.join(base,d,f) for f
|
return [os.path.join(base,d,f) for f
|
||||||
in os.listdir(os.path.join(base, d)) if ext in f]
|
in os.listdir(os.path.join(base, d)) if ext in f]
|
||||||
|
|
||||||
def xtest_bad():
|
def test_bad():
|
||||||
""" These shouldn't crash/dos, but they shouldn't return anything either """
|
""" These shouldn't crash/dos, but they shouldn't return anything either """
|
||||||
for f in get_files('b'):
|
for f in get_files('b'):
|
||||||
try:
|
try:
|
||||||
print ("Trying %s"%f)
|
|
||||||
im = Image.open(f)
|
im = Image.open(f)
|
||||||
print ("%s, %s" %(im.size, im.mode))
|
|
||||||
im.load()
|
im.load()
|
||||||
except Exception as msg:
|
except Exception as msg:
|
||||||
print ("Bad Image %s: %s" %(f,msg))
|
pass
|
||||||
|
# print ("Bad Image %s: %s" %(f,msg))
|
||||||
|
|
||||||
def xtest_questionable():
|
def test_questionable():
|
||||||
""" These shouldn't crash/dos, but its not well defined that these are in spec """
|
""" These shouldn't crash/dos, but its not well defined that these are in spec """
|
||||||
for f in get_files('q'):
|
for f in get_files('q'):
|
||||||
try:
|
try:
|
||||||
print ("Trying %s"%f)
|
|
||||||
im = Image.open(f)
|
im = Image.open(f)
|
||||||
print ("%s, %s" %(im.size, im.mode))
|
|
||||||
im.load()
|
im.load()
|
||||||
except Exception as msg:
|
except Exception as msg:
|
||||||
print ("Bad Image %s: %s" %(f,msg))
|
pass
|
||||||
|
# print ("Bad Image %s: %s" %(f,msg))
|
||||||
|
|
||||||
|
|
||||||
def test_good():
|
def test_good():
|
||||||
|
@ -65,10 +63,7 @@ def test_good():
|
||||||
|
|
||||||
for f in get_files('g'):
|
for f in get_files('g'):
|
||||||
try:
|
try:
|
||||||
print '.',
|
|
||||||
#print ("Trying %s"%f)
|
|
||||||
im = Image.open(f)
|
im = Image.open(f)
|
||||||
#print ("%s, %s" %(im.size, im.mode))
|
|
||||||
im.load()
|
im.load()
|
||||||
compare = Image.open(get_compare(f))
|
compare = Image.open(get_compare(f))
|
||||||
compare.load()
|
compare.load()
|
||||||
|
@ -82,5 +77,5 @@ def test_good():
|
||||||
|
|
||||||
|
|
||||||
except Exception as msg:
|
except Exception as msg:
|
||||||
print ("Bad Image %s: %s" %(f,msg))
|
print ("Unsupported Image %s: %s" %(f,msg))
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue
Block a user