mirror of
https://github.com/python/cpython.git
synced 2024-12-18 06:14:00 +08:00
test_ctypes: Windows is no more a special case
This commit is contained in:
parent
287eca658d
commit
d83f226d93
@ -73,13 +73,10 @@ class SimpleTypesTestCase(unittest.TestCase):
|
||||
except ImportError:
|
||||
## print "(No c_wchar_p)"
|
||||
return
|
||||
s = "123"
|
||||
if sys.platform == "win32":
|
||||
self.assertTrue(c_wchar_p.from_param(s)._obj is s)
|
||||
self.assertRaises(TypeError, c_wchar_p.from_param, 42)
|
||||
|
||||
# new in 0.9.1: convert (decode) ascii to unicode
|
||||
self.assertEqual(c_wchar_p.from_param("123")._obj, "123")
|
||||
c_wchar_p.from_param("123")
|
||||
|
||||
self.assertRaises(TypeError, c_wchar_p.from_param, 42)
|
||||
self.assertRaises(TypeError, c_wchar_p.from_param, b"123\377")
|
||||
|
||||
pa = c_wchar_p.from_param(c_wchar_p("123"))
|
||||
|
Loading…
Reference in New Issue
Block a user