From: Thomas Heller Date: Fri, 12 Jan 2007 20:08:19 +0000 (+0000) Subject: Avoid warnings in the test suite because ctypes.wintypes cannot be X-Git-Tag: v2.6a1~2287 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=572104ff5c49cb93084d1ea96bd8385dddddc260;p=python Avoid warnings in the test suite because ctypes.wintypes cannot be imported on non-windows systems. --- diff --git a/Lib/ctypes/test/test_win32.py b/Lib/ctypes/test/test_win32.py index d6f018bd68..057873c57e 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),