|
4 | 4 | from unittest import mock |
5 | 5 |
|
6 | 6 | import comtypes.client |
7 | | -from comtypes import CLSCTX_SERVER, COMObject, IUnknown, hresult |
| 7 | +from comtypes import CLSCTX_SERVER, COMObject, IPersist, IUnknown, hresult |
8 | 8 | from comtypes._post_coinit.misc import _CoCreateInstance |
9 | 9 | from comtypes.automation import IDispatch |
10 | 10 | from comtypes.typeinfo import GUIDKIND_DEFAULT_SOURCE_DISP_IID |
@@ -143,3 +143,17 @@ def test(self): |
143 | 143 | uiac.CUIAutomation().IPersist_GetClassID(), |
144 | 144 | uiac.CUIAutomation._reg_clsid_, |
145 | 145 | ) |
| 146 | + |
| 147 | + |
| 148 | +class Test_Vtbl(ut.TestCase): |
| 149 | + def test_com_pointers(self): |
| 150 | + stdpic = stdole.StdPicture() |
| 151 | + cuia = uiac.CUIAutomation() |
| 152 | + self.assertIs( |
| 153 | + type(stdpic._com_pointers_[IPersist._iid_]), |
| 154 | + type(cuia._com_pointers_[IPersist._iid_]), |
| 155 | + ) |
| 156 | + self.assertIn(IDispatch._iid_, stdpic._com_pointers_) |
| 157 | + self.assertNotIn(IDispatch._iid_, cuia._com_pointers_) |
| 158 | + self.assertIn(stdole.IPictureDisp._iid_, stdpic._com_pointers_) |
| 159 | + self.assertIn(uiac.IUIAutomation._iid_, cuia._com_pointers_) |
0 commit comments