diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-02-04 15:20:16 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-02-04 15:20:16 +0200 |
commit | 759ab1226698d1d7646955ac25fe1c806ba20c46 (patch) | |
tree | 93c0d12b1d61d651bb36404d747e6f9254bbe257 /Lib/ctypes | |
parent | d4f7141d7c0ca3b5e17ef9d326239471be328ee2 (diff) | |
parent | c27d87d6756c61372ae0aadd2f5fca9cb68dd717 (diff) | |
download | cpython-759ab1226698d1d7646955ac25fe1c806ba20c46.tar.gz |
Temporarily disable test_from_dll in test_returnfuncptrs.py for Windows.
Diffstat (limited to 'Lib/ctypes')
-rw-r--r-- | Lib/ctypes/__init__.py | 6 | ||||
-rw-r--r-- | Lib/ctypes/test/test_checkretval.py | 2 | ||||
-rw-r--r-- | Lib/ctypes/test/test_win32.py | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py index c92e130976..e2f75c598f 100644 --- a/Lib/ctypes/__init__.py +++ b/Lib/ctypes/__init__.py @@ -395,7 +395,7 @@ if _os.name in ("nt", "ce"): _type_ = "l" # _check_retval_ is called with the function's result when it # is used as restype. It checks for the FAILED bit, and - # raises a WindowsError if it is set. + # raises an OSError if it is set. # # The _check_retval_ method is implemented in C, so that the # method definition itself is not included in the traceback @@ -407,7 +407,7 @@ if _os.name in ("nt", "ce"): class OleDLL(CDLL): """This class represents a dll exporting functions using the Windows stdcall calling convention, and returning HRESULT. - HRESULT error values are automatically raised as WindowsError + HRESULT error values are automatically raised as OSError exceptions. """ _func_flags_ = _FUNCFLAG_STDCALL @@ -456,7 +456,7 @@ if _os.name in ("nt", "ce"): code = GetLastError() if descr is None: descr = FormatError(code).strip() - return WindowsError(None, descr, None, code) + return OSError(None, descr, None, code) if sizeof(c_uint) == sizeof(c_void_p): c_size_t = c_uint diff --git a/Lib/ctypes/test/test_checkretval.py b/Lib/ctypes/test/test_checkretval.py index 01ccc57686..19bb8135b3 100644 --- a/Lib/ctypes/test/test_checkretval.py +++ b/Lib/ctypes/test/test_checkretval.py @@ -31,7 +31,7 @@ class Test(unittest.TestCase): pass else: def test_oledll(self): - self.assertRaises(WindowsError, + self.assertRaises(OSError, oledll.oleaut32.CreateTypeLib2, 0, None, None) diff --git a/Lib/ctypes/test/test_win32.py b/Lib/ctypes/test/test_win32.py index da21336682..91ad3149a7 100644 --- a/Lib/ctypes/test/test_win32.py +++ b/Lib/ctypes/test/test_win32.py @@ -41,7 +41,7 @@ if sys.platform == "win32": # Call functions with invalid arguments, and make sure # that access violations are trapped and raise an # exception. - self.assertRaises(WindowsError, windll.kernel32.GetModuleHandleA, 32) + self.assertRaises(OSError, windll.kernel32.GetModuleHandleA, 32) def test_noargs(self): # This is a special case on win32 x64 |