Skip to content
Closed
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
18 changes: 18 additions & 0 deletions tests/v1/kv_connector/unit/test_moriio_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,24 @@
)


def is_ibverbs_available():
from shutil import which

print(f"which = {which('ibv_devices')}")
if which("ibv_devices") is None:
return False
from subprocess import check_output

output = check_output(["ibv_devices"]).decode("UTF-8")
if len(output.split("\n")) < 12:
return False
return True

Check failure on line 60 in tests/v1/kv_connector/unit/test_moriio_connector.py

View workflow job for this annotation

GitHub Actions / pre-commit

Ruff (SIM103)

tests/v1/kv_connector/unit/test_moriio_connector.py:58:5: SIM103 Return the condition `not len(output.split("\n")) < 12` directly
Comment thread
rasmith marked this conversation as resolved.
Outdated


if not is_ibverbs_available():
pytest.skip("This test requires IB Verbs to run", allow_module_level=True)


@pytest.fixture
def mock_parallel_groups():
"""Mock tensor/data parallel group functions for single-rank tests."""
Expand Down
Loading