mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-04-25 19:43:45 +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 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
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user