Skip to content

Commit 01e30d9

Browse files
committed
hacky
1 parent 65d1c12 commit 01e30d9

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/xdist/workermanage.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,7 @@ def setup_nodes(
104104
executor.submit(self.setup_node, spec, putevent)
105105
for spec in self.specs
106106
]
107-
results = [f.result() for f in futs]
108-
for r in results:
109-
self.config.hook.pytest_xdist_newgateway(gateway=r.gateway)
110-
return results
107+
return [f.result() for f in futs]
111108

112109
def setup_node(
113110
self,
@@ -117,6 +114,7 @@ def setup_node(
117114
if getattr(spec, "execmodel", None) != "main_thread_only":
118115
spec = execnet.XSpec(f"execmodel=main_thread_only//{spec}")
119116
gw = self.group.makegateway(spec)
117+
self.config.hook.pytest_xdist_newgateway(gateway=gw)
120118
self.rsync_roots(gw)
121119
node = WorkerController(self, gw, self.config, putevent)
122120
# Keep the node alive.

testing/test_workermanage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def dest(tmp_path: Path) -> Path:
5151
def workercontroller(monkeypatch: pytest.MonkeyPatch) -> None:
5252
class MockController:
5353
def __init__(self, *args: object) -> None:
54-
self.gateway = args[1]
54+
pass
5555

5656
def setup(self) -> None:
5757
pass

0 commit comments

Comments
 (0)