Skip to content
Open
Changes from all commits
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
23 changes: 16 additions & 7 deletions lib/bindings/python/tests/replay/replay_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,23 @@
"""


# AISimulate ships as the ``aisim`` distribution from 0.14.0 onward; earlier
# releases used ``aisimulate``. The import name is ``aisimulate`` for both.
_AISIMULATE_DISTRIBUTIONS = ("aisim", "aisimulate")


def _require_aisimulate_distribution(*, allow_module_level: bool = False) -> None:
try:
distribution("aisimulate")
except PackageNotFoundError:
pytest.skip(
"Dynamo replay integration tests require the optional AISimulate distribution",
allow_module_level=allow_module_level,
)
for name in _AISIMULATE_DISTRIBUTIONS:
try:
distribution(name)
return
except PackageNotFoundError:
continue
pytest.skip(
"Dynamo replay integration tests require the optional AISimulate "
f"distribution (one of {', '.join(_AISIMULATE_DISTRIBUTIONS)})",
allow_module_level=allow_module_level,
)


def _vllm_args_payload():
Expand Down
Loading