8000 gh-126615: Make `COMError` public and add to `ctypes` doc. by junkmd · Pull Request #126686 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-126615: Make COMError public and ad 8000 d to ctypes doc. #126686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Nov 20, 2024
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
Loading
0