MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / _worker_suffix

Function _worker_suffix

e2e/python/conftest.py:76–84  ·  view source on GitHub ↗

Return a suffix for worker-unique resource names. Uses the built-in ``worker_id`` fixture from pytest-xdist which returns ``"gw0"``, ``"gw1"``, etc. for workers, or ``"master"`` for non-xdist runs.

(worker_id: str)

Source from the content-addressed store, hash-verified

74
75@pytest.fixture(scope="session")
76def _worker_suffix(worker_id: str) -> str:
77 """Return a suffix for worker-unique resource names.
78
79 Uses the built-in ``worker_id`` fixture from pytest-xdist which returns
80 ``"gw0"``, ``"gw1"``, etc. for workers, or ``"master"`` for non-xdist runs.
81 """
82 if worker_id == "master":
83 return ""
84 return f"-{worker_id}"
85
86
87@pytest.fixture

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected