MCPcopy
hub / github.com/pytest-dev/pytest-xdist / __init__

Method __init__

src/xdist/remote.py:113–122  ·  view source on GitHub ↗
(self, config: pytest.Config, channel: execnet.Channel)

Source from the content-addressed store, hash-verified

111
112class 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)

Callers

nothing calls this directly

Calls 3

ProducerClass · 0.85
TestQueueClass · 0.85
getMethod · 0.80

Tested by

no test coverage detected