Commit b823fc6
authored
Enhance
* test: Add test for `GetRefTypeOfImplType` with pure dispatch interfaces.
This test verifies the behavior of `ITypeInfo.GetRefTypeOfImplType`
when called on a pure dispatch interface.
It asserts that a `COMError` with `TYPE_E_ELEMENTNOTFOUND` is raised,
which also serves as further validation for the recently corrected
HRESULT constant.
* test: Add test for `GetRefTypeOfImplType` with custom interfaces.
This adds another test for `ITypeInfo.GetRefTypeOfImplType`,
this time using a custom interface.
This expands test coverage and further validates that `COMError`
with `TYPE_E_ELEMENTNOTFOUND` is correctly raised for invalid calls.
* test: Add test for `GetRefTypeOfImplType` with dual interfaces.
* refactor: Use qualified `typeinfo` constants and add `TYPEFLAG_FDUAL` assertions.
Replaced direct imports of `TKIND_DISPATCH` and `TKIND_INTERFACE` with
qualified references (e.g., `typeinfo.TKIND_DISPATCH`) for consistency
within `test_typeinfo.py`.
Additionally, added assertions for `TYPEFLAG_FDUAL` in the tests for
pure dispatch and dual interfaces to more thoroughly verify interface
flags, especially for dual interfaces.
* refactor: Consolidate `hresult` import in `test_typeinfo.py`.
The `comtypes.hresult` import was replaced with a direct import
from `comtypes`, and usages were updated accordingly. This change
improves consistency with other imports in the module.
* refactor: Import `COMError` from `_ctypes` in `test_typeinfo.py`.
To align with internal conventions, the import for `COMError`
has been changed from `comtypes` to the more direct `_ctypes` module.
* docs: Add comment with link to official documentation for `GetRefTypeOfImplType`.ITypeInfo testing. (#884)1 parent bd1ed82 commit b823fc6
2 files changed
+41
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | | - | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
| |||
69 | 67 | | |
70 | 68 | | |
71 | 69 | | |
72 | | - | |
| 70 | + | |
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
| |||
87 | 85 | | |
88 | 86 | | |
89 | 87 | | |
90 | | - | |
| 88 | + | |
91 | 89 | | |
92 | 90 | | |
93 | 91 | | |
| |||
97 | 95 | | |
98 | 96 | | |
99 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
100 | 134 | | |
101 | 135 | | |
102 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
| 627 | + | |
627 | 628 | | |
628 | 629 | | |
629 | 630 | | |
| |||
0 commit comments