| 111 | |
| 112 | class WorkerInteractor: |
| 113 | def __init__(self, config: pytest.Config, channel: execnet.Channel) -> None: |
| 114 | self.config = config |
| 115 | workerinput: dict[str, Any] = config.workerinput # type: ignore[attr-defined] |
| 116 | self.workerid = workerinput.get("workerid", "?") |
| 117 | self.testrunuid = workerinput["testrunuid"] |
| 118 | self.log = Producer(f"worker-{self.workerid}", enabled=config.option.debug) |
| 119 | self.channel = channel |
| 120 | self.torun = TestQueue(self.channel.gateway.execmodel) |
| 121 | self.nextitem_index: int | None | Literal[Marker.SHUTDOWN] = None |
| 122 | config.pluginmanager.register(self) |
| 123 | |
| 124 | def sendevent(self, name: str, **kwargs: object) -> None: |
| 125 | self.log("sending", name, kwargs) |