summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-11-22 16:19:04 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-11-22 16:19:04 (GMT)
commit0662bc297ae4cc8ba77de57b64c9999bc1f1c132 (patch)
treedb1419c4b58c08cbf093b4f37fdf04b382cdfa62 /Lib/test/test_unicode.py
parent2baf1a69f4d72e2107b0941a625fd7603f45ae38 (diff)
downloadcpython-0662bc297ae4cc8ba77de57b64c9999bc1f1c132.zip
cpython-0662bc297ae4cc8ba77de57b64c9999bc1f1c132.tar.gz
cpython-0662bc297ae4cc8ba77de57b64c9999bc1f1c132.tar.bz2
Fix tests when ctypes isn't available
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r--Lib/test/test_unicode.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 8f50800..ddbeac2 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')