Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
hacky
  • Loading branch information
sshane committed Jul 26, 2025
commit 01e30d92ba16718ea547bc857aca7bedc63b8c3e
6 changes: 2 additions & 4 deletions src/xdist/workermanage.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ def setup_nodes(
executor.submit(self.setup_node, spec, putevent)
for spec in self.specs
]
results = [f.result() for f in futs]
for r in results:
self.config.hook.pytest_xdist_newgateway(gateway=r.gateway)
return results
return [f.result() for f in futs]

def setup_node(
self,
Expand All @@ -117,6 +114,7 @@ def setup_node(
if getattr(spec, "execmodel", None) != "main_thread_only":
spec = execnet.XSpec(f"execmodel=main_thread_only//{spec}")
gw = self.group.makegateway(spec)
self.config.hook.pytest_xdist_newgateway(gateway=gw)
self.rsync_roots(gw)
node = WorkerController(self, gw, self.config, putevent)
# Keep the node alive.
Expand Down
2 changes: 1 addition & 1 deletion testing/test_workermanage.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def dest(tmp_path: Path) -> Path:
def workercontroller(monkeypatch: pytest.MonkeyPatch) -> None:
class MockController:
def __init__(self, *args: object) -> None:
self.gateway = args[1]
pass

def setup(self) -> None:
pass
Expand Down
Loading