fix(test): remove live_gui skip gate — lock mechanism handles coordination
This commit is contained in:
+5
-11
@@ -135,19 +135,13 @@ def pytest_unconfigure(config: object) -> None:
|
|||||||
|
|
||||||
def pytest_collection_modifyitems(config: object, items: list[object]) -> None:
|
def pytest_collection_modifyitems(config: object, items: list[object]) -> None:
|
||||||
"""
|
"""
|
||||||
xdist worker gate: only gw0 (or the master, if not running under xdist)
|
No-op. The live_gui fixture uses a file-based lock to serialize ownership
|
||||||
actually runs tests that depend on the live_gui fixture. Other workers
|
of the sloppy.py subprocess: the first worker to acquire the lock spawns
|
||||||
deselect those tests to avoid port-8999 collisions and to honor the
|
it, other workers wait for the hook server and yield a client handle.
|
||||||
"don't multi-thread live_gui" directive.
|
All workers CAN run live_gui tests; the lock prevents port-8999 collisions.
|
||||||
[C: tests/conftest.py:live_gui fixture]
|
[C: tests/conftest.py:live_gui fixture]
|
||||||
"""
|
"""
|
||||||
_worker = os.environ.get("PYTEST_XDIST_WORKER", "master")
|
return
|
||||||
if _worker in ("master", "gw0"):
|
|
||||||
return
|
|
||||||
_skip = pytest.mark.skip(reason=f"live_gui tests only run on master/gw0 (this worker is {_worker})")
|
|
||||||
for item in items:
|
|
||||||
if "live_gui" in getattr(item, "fixturenames", ()):
|
|
||||||
item.add_marker(_skip)
|
|
||||||
|
|
||||||
_REQUIRED_TEST_IMPORTS: list[tuple[str, str]] = [
|
_REQUIRED_TEST_IMPORTS: list[tuple[str, str]] = [
|
||||||
("sentence_transformers", "sentence-transformers"),
|
("sentence_transformers", "sentence-transformers"),
|
||||||
|
|||||||
Reference in New Issue
Block a user