diff options
Diffstat (limited to 'Lib/test/test_codecs.py')
-rw-r--r-- | Lib/test/test_codecs.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index f70ae3364a..e9ce95a866 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -3,9 +3,14 @@ import unittest import codecs import locale import sys, _testcapi, io -import ctypes -SIZEOF_WCHAR_T = ctypes.sizeof(ctypes.c_wchar) +try: + import ctypes +except ImportError: + ctypes = None + SIZEOF_WCHAR_T = -1 +else: + SIZEOF_WCHAR_T = ctypes.sizeof(ctypes.c_wchar) class Queue(object): """ |