From 0662bc297ae4cc8ba77de57b64c9999bc1f1c132 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Mon, 22 Nov 2010 16:19:04 +0000 Subject: [PATCH] Fix tests when ctypes isn't available --- Lib/test/test_unicode.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index 8f50800b8e7..ddbeac2370e 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -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')