![](https://secure.gravatar.com/avatar/8ac615df352a970211b0e3d94a307c6d.jpg?s=120&d=mm&r=g)
Author: victor.stinner Date: Sat Jul 31 12:52:56 2010 New Revision: 83337 Log: Issue #8966: Fix ctypes tests for Windows I removed the implicit conversion from str to bytes. Modified: python/branches/py3k/Lib/ctypes/test/test_bytes.py python/branches/py3k/Lib/ctypes/test/test_loading.py python/branches/py3k/Lib/ctypes/test/test_random_things.py Modified: python/branches/py3k/Lib/ctypes/test/test_bytes.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_bytes.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_bytes.py Sat Jul 31 12:52:56 2010 @@ -45,7 +45,6 @@ _type_ = "X" BSTR("abc") - BSTR(b"abc") if __name__ == '__main__': unittest.main() Modified: python/branches/py3k/Lib/ctypes/test/test_loading.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_loading.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_loading.py Sat Jul 31 12:52:56 2010 @@ -97,7 +97,7 @@ self.assertEqual(0, advapi32.CloseEventLog(None)) windll.kernel32.GetProcAddress.argtypes = c_void_p, c_char_p windll.kernel32.GetProcAddress.restype = c_void_p - proc = windll.kernel32.GetProcAddress(advapi32._handle, "CloseEventLog") + proc = windll.kernel32.GetProcAddress(advapi32._handle, b"CloseEventLog") self.assertTrue(proc) # This is the real test: call the function via 'call_function' self.assertEqual(0, call_function(proc, (None,))) Modified: python/branches/py3k/Lib/ctypes/test/test_random_things.py ============================================================================== --- python/branches/py3k/Lib/ctypes/test/test_random_things.py (original) +++ python/branches/py3k/Lib/ctypes/test/test_random_things.py Sat Jul 31 12:52:56 2010 @@ -18,7 +18,7 @@ windll.kernel32.GetProcAddress.restype = c_void_p hdll = windll.kernel32.LoadLibraryA(b"kernel32") - funcaddr = windll.kernel32.GetProcAddress(hdll, "GetModuleHandleA") + funcaddr = windll.kernel32.GetProcAddress(hdll, b"GetModuleHandleA") self.assertEqual(call_function(funcaddr, (None,)), windll.kernel32.GetModuleHandleA(None))
participants (1)
-
victor.stinner