]> granicus.if.org Git - python/commitdiff
Fix tests when ctypes isn't available
authorAntoine Pitrou <solipsis@pitrou.net>
Mon, 22 Nov 2010 16:19:04 +0000 (16:19 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Mon, 22 Nov 2010 16:19:04 +0000 (16:19 +0000)
Lib/test/test_unicode.py

index 8f50800b8e75d6fbfe306ada7bea64cf1a0caa5d..ddbeac2370e4785bfd97a63bc77c8683a07f3c3f 100644 (file)
@@ -1439,6 +1439,7 @@ class UnicodeTest(string_tests.CommonTest,
     # Test PyUnicode_AsWideChar()
     def test_aswidechar(self):
         from _testcapi import unicode_aswidechar
+        support.import_module('ctypes')
         from ctypes import c_wchar, sizeof
 
         wchar, size = unicode_aswidechar('abcdef', 2)
@@ -1475,6 +1476,7 @@ class UnicodeTest(string_tests.CommonTest,
     # Test PyUnicode_AsWideCharString()
     def test_aswidecharstring(self):
         from _testcapi import unicode_aswidecharstring
+        support.import_module('ctypes')
         from ctypes import c_wchar, sizeof
 
         wchar, size = unicode_aswidecharstring('abc')