[Bugfix] Preserve non-logitproc entry points in tests (#51097)

Signed-off-by: Tristan Rice <rice@fn.lc>
This commit is contained in:
Tristan Rice
2026-08-10 18:14:53 -04:00
committed by GitHub
parent fa722b9f01
commit 98a4144a41
2 changed files with 36 additions and 5 deletions
+8 -5
View File
@@ -234,11 +234,6 @@ def register_fake_entrypoint(monkeypatch) -> str:
return str(tmpdir)
def fake_entry_points(group: str) -> EntryPoints:
"""Fake version of importlib.metadata.entry_points."""
return EntryPoints(group)
def setup_fake_entrypoint(monkeypatch) -> None:
"""Expose the dummy logitproc entrypoint for the current platform."""
if requires_spawn_multiprocessing():
@@ -248,5 +243,13 @@ def setup_fake_entrypoint(monkeypatch) -> None:
import importlib.metadata
original_entry_points = importlib.metadata.entry_points
def fake_entry_points(**kwargs):
group = kwargs.get("group")
if group == LOGITSPROCS_GROUP:
return EntryPoints(group)
return original_entry_points(**kwargs)
monkeypatch.setattr(importlib.metadata, "entry_points", fake_entry_points)
monkeypatch.setenv("VLLM_WORKER_MULTIPROC_METHOD", "fork")