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