Have to guard the ctypes.wintypes import

This commit is contained in:
wiredfool 2015-10-01 14:47:16 +01:00
parent 7a48d7658d
commit eb80824f51

View File

@ -1,15 +1,14 @@
from helper import unittest, PillowTestCase, hopper
from PIL import Image, ImageWin
import sys
import ctypes
import ctypes.wintypes
from io import BytesIO
# see https://github.com/python-pillow/Pillow/pull/1431#issuecomment-144692652
if not sys.platform.startswith('win32'):
unittest.skip("Win32 only test")
if sys.platform.startswith('win32'):
import ctypes.wintypes
class BITMAPFILEHEADER(ctypes.Structure):
_pack_ = 2
@ -110,4 +109,3 @@ class TestImageWinPointers(PillowTestCase):
if __name__ == '__main__':
unittest.main()
# End of file