summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2007-01-12 20:08:19 (GMT)
committerThomas Heller <theller@ctypes.org>2007-01-12 20:08:19 (GMT)
commit572104ff5c49cb93084d1ea96bd8385dddddc260 (patch)
tree58eb44af43e4440519ddd9d0e81b148d17063b20
parent2464087bda04dc5f49667096a3d7998907a1108b (diff)
downloadcpython-572104ff5c49cb93084d1ea96bd8385dddddc260.zip
cpython-572104ff5c49cb93084d1ea96bd8385dddddc260.tar.gz
cpython-572104ff5c49cb93084d1ea96bd8385dddddc260.tar.bz2
Avoid warnings in the test suite because ctypes.wintypes cannot be
imported on non-windows systems.
-rw-r--r--Lib/ctypes/test/test_win32.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/ctypes/test/test_win32.py b/Lib/ctypes/test/test_win32.py
index d6f018b..057873c 100644
--- a/Lib/ctypes/test/test_win32.py
+++ b/Lib/ctypes/test/test_win32.py
@@ -3,7 +3,6 @@
from ctypes import *
from ctypes.test import is_resource_enabled
import unittest, sys
-from ctypes import wintypes
import _ctypes_test
@@ -49,9 +48,11 @@ if sys.platform == "win32":
class TestWintypes(unittest.TestCase):
def test_HWND(self):
+ from ctypes import wintypes
self.failUnlessEqual(sizeof(wintypes.HWND), sizeof(c_void_p))
def test_PARAM(self):
+ from ctypes import wintypes
self.failUnlessEqual(sizeof(wintypes.WPARAM),
sizeof(c_void_p))
self.failUnlessEqual(sizeof(wintypes.LPARAM),