Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update test_COMError.
  • Loading branch information
junkmd committed Nov 19, 2024
commit 57d76c5c23cf4c7222e5233bf8ec1abc6ac2b3fc
7 changes: 4 additions & 3 deletions Lib/test/test_ctypes/test_win32.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,16 @@ def test_PARAM(self):
sizeof(c_void_p))

def test_COMError(self):
from _ctypes import COMError
from ctypes import COMError
if support.HAVE_DOCSTRINGS:
self.assertEqual(COMError.__doc__,
"Raised when a COM method call failed.")

ex = COMError(-1, "text", ("details",))
ex = COMError(-1, "text", ("descr", "source", "helpfile", 0, "progid"))
self.assertEqual(ex.hresult, -1)
self.assertEqual(ex.text, "text")
self.assertEqual(ex.details, ("details",))
self.assertEqual(ex.details,
("descr", "source", "helpfile", 0, "progid"))

self.assertEqual(COMError.mro(),
[COMError, Exception, BaseException, object])
Expand Down