test_image_draft: skip if no JPEG support.

This commit is contained in:
Michał Górny 2013-04-21 10:27:27 +02:00
parent e2221de8f5
commit a5a5c854b8

View File

@ -2,6 +2,11 @@ from tester import *
from PIL import Image
codecs = dir(Image.core)
if "jpeg_encoder" not in codecs or "jpeg_decoder" not in codecs:
skip("jpeg support not available")
filename = "Images/lena.jpg"
data = tostring(Image.open(filename).resize((512, 512)), "JPEG")