Improve test coverage of _sync.py

This commit is contained in:
James R. Barlow
2019-12-10 01:06:27 -08:00
parent 9af59c0d6d
commit c5571388e2
5 changed files with 129 additions and 9 deletions
+3 -3
View File
@@ -47,8 +47,8 @@ VECTOR_PAGE_DPI = 400
def triage_image_file(input_file, output_file, options, log):
log.info("Input file is not a PDF, checking if it is an image...")
try:
log.info("Input file is not a PDF, checking if it is an image...")
im = Image.open(input_file)
except EnvironmentError as e:
# Recover the original filename
@@ -85,9 +85,9 @@ def triage_image_file(input_file, output_file, options, log):
if 'iccprofile' not in im.info:
if im.mode == 'RGB':
log.info('Input image has no ICC profile, assuming sRGB')
log.info("Input image has no ICC profile, assuming sRGB")
elif im.mode == 'CMYK':
log.info('Input CMYK image has no ICC profile, not usable')
log.error("Input CMYK image has no ICC profile, not usable")
raise UnsupportedImageFormatError()
try: