mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Avoid warnings in the test suite because ctypes.wintypes cannot be
imported on non-windows systems.
This commit is contained in:
parent
2464087bda
commit
572104ff5c
1 changed files with 2 additions and 1 deletions
|
@ -3,7 +3,6 @@
|
||||||
from ctypes import *
|
from ctypes import *
|
||||||
from ctypes.test import is_resource_enabled
|
from ctypes.test import is_resource_enabled
|
||||||
import unittest, sys
|
import unittest, sys
|
||||||
from ctypes import wintypes
|
|
||||||
|
|
||||||
import _ctypes_test
|
import _ctypes_test
|
||||||
|
|
||||||
|
@ -49,9 +48,11 @@ if sys.platform == "win32":
|
||||||
|
|
||||||
class TestWintypes(unittest.TestCase):
|
class TestWintypes(unittest.TestCase):
|
||||||
def test_HWND(self):
|
def test_HWND(self):
|
||||||
|
from ctypes import wintypes
|
||||||
self.failUnlessEqual(sizeof(wintypes.HWND), sizeof(c_void_p))
|
self.failUnlessEqual(sizeof(wintypes.HWND), sizeof(c_void_p))
|
||||||
|
|
||||||
def test_PARAM(self):
|
def test_PARAM(self):
|
||||||
|
from ctypes import wintypes
|
||||||
self.failUnlessEqual(sizeof(wintypes.WPARAM),
|
self.failUnlessEqual(sizeof(wintypes.WPARAM),
|
||||||
sizeof(c_void_p))
|
sizeof(c_void_p))
|
||||||
self.failUnlessEqual(sizeof(wintypes.LPARAM),
|
self.failUnlessEqual(sizeof(wintypes.LPARAM),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue