mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 01:34:24 +03:00
Have to guard the ctypes.wintypes import
This commit is contained in:
parent
7a48d7658d
commit
eb80824f51
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user