enthought / comtypes

A pure Python, lightweight COM client and server framework, based on the ctypes Python FFI package.
Other
292 stars 98 forks source link

broken test scripts using ConnectableObjectMixin #11

Open cfarrow opened 10 years ago

cfarrow commented 10 years ago

Both ./test/TestComServer.py and ./TestDispServer.py scripts are broken in 0.6.0 (tested on Windows XP, both .zip and .exe distribution). I was able to debug for the actual cause, the reason is that classes using ConnectableObjectMixin (comtypes.server.connectionpoints.ConnectableObjectMixin) require that _outgoinginterfaces be declared in the class definition. So line 107 in server/connectionpoints.py fails when creating a client tries to use the com object. Actually, TestDispServer.tlb is missing (yes, this time I confirmed it's missing from the .exe distribution), I just focused on the TestComServer.py script, but I'm sure it will fail when having the .tlb file due to the same reason. I don't know what's best, just simple remove the ConnectableObjectMixin from the class (I don't like this, but works) or implement the _outgoinginterfaces classes (yes, I would like this!) so we have a great hint on how to use it. R. Aguirre

cfarrow commented 10 years ago

Migrated from https://sourceforge.net/p/comtypes/bugs/12/.