Pure Python COM package for Windows COM automation and interoperability
88
{
"context": "This criteria evaluates how well the engineer uses comtypes to implement a COM event source (connection points). The focus is on proper usage of comtypes.server.connectionpoints module classes and correct implementation of the IConnectionPointContainer pattern for firing events to multiple connected clients.",
"type": "weighted_checklist",
"checklist": [
{
"name": "ConnectableObjectMixin usage",
"description": "Uses comtypes.server.connectionpoints.ConnectableObjectMixin as a base class or mixin for the TemperatureMonitor class to implement IConnectionPointContainer",
"max_score": 25
},
{
"name": "Event interface definition",
"description": "Properly defines the ITemperatureEvents interface using comtypes interface definition syntax (inheriting from IUnknown or using COMMETHOD definitions) with the three event methods (on_temperature_changed, on_temperature_warning, on_temperature_normal)",
"max_score": 20
},
{
"name": "Connection point registration",
"description": "Correctly registers the event interface as a connection point using _com_interfaces_ or _outgoing_interfaces_ attribute on the COM server class",
"max_score": 15
},
{
"name": "Event firing mechanism",
"description": "Implements event firing to all connected sinks using the connection point's fire() method or by iterating through connected sinks and calling their methods",
"max_score": 20
},
{
"name": "COMObject inheritance",
"description": "Properly inherits from comtypes.COMObject or uses @comtypes.GUID decorator to make TemperatureMonitor a valid COM server class",
"max_score": 10
},
{
"name": "Temperature change events",
"description": "Correctly fires on_temperature_changed event with old and new temperature values when set_temperature is called",
"max_score": 5
},
{
"name": "Warning threshold events",
"description": "Properly implements logic to fire on_temperature_warning when temperature exceeds 75°C and on_temperature_normal when it returns below 75°C",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-comtypesevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10