diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-07-31 10:52:56 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-07-31 10:52:56 (GMT) |
commit | d5baeee66bf7c5576accd37730b5e8ebe79c3fcd (patch) | |
tree | 557020ca4d7a151671392ab366df50765e00b806 /Lib | |
parent | 73a01d4fb3c1e894b06f7f5860ae6878f7ec5f57 (diff) | |
download | cpython-d5baeee66bf7c5576accd37730b5e8ebe79c3fcd.zip cpython-d5baeee66bf7c5576accd37730b5e8ebe79c3fcd.tar.gz cpython-d5baeee66bf7c5576accd37730b5e8ebe79c3fcd.tar.bz2 |
Issue #8966: Fix ctypes tests for Windows
I removed the implicit conversion from str to bytes.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/ctypes/test/test_bytes.py | 1 | ||||
-rw-r--r-- | Lib/ctypes/test/test_loading.py | 2 | ||||
-rw-r--r-- | Lib/ctypes/test/test_random_things.py | 2 |
3 files changed, 2 insertions, 3 deletions
diff --git a/Lib/ctypes/test/test_bytes.py b/Lib/ctypes/test/test_bytes.py index 57cf365..ee49c45 100644 --- a/Lib/ctypes/test/test_bytes.py +++ b/Lib/ctypes/test/test_bytes.py @@ -45,7 +45,6 @@ class BytesTest(unittest.TestCase): _type_ = "X" BSTR("abc") - BSTR(b"abc") if __name__ == '__main__': unittest.main() diff --git a/Lib/ctypes/test/test_loading.py b/Lib/ctypes/test/test_loading.py index 07b69ec..4029b46 100644 --- a/Lib/ctypes/test/test_loading.py +++ b/Lib/ctypes/test/test_loading.py @@ -97,7 +97,7 @@ class LoaderTest(unittest.TestCase): 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,))) diff --git a/Lib/ctypes/test/test_random_things.py b/Lib/ctypes/test/test_random_things.py index 4e9f08f..515acf5 100644 --- a/Lib/ctypes/test/test_random_things.py +++ b/Lib/ctypes/test/test_random_things.py @@ -18,7 +18,7 @@ if sys.platform == "win32": 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)) |