Skip to content

Commit

Permalink
Fix vllm-related pytest warning (that was spaming user)
Browse files Browse the repository at this point in the history
Before this commit, when you ran pytest -k specific_test, it spawned dozens of the same skipped warnings message on stdout... IMHO, that was not ideal ^^

Bug introduced in d32dfde
  • Loading branch information
yvan-sraka committed Jan 6, 2025
1 parent 3cc399d commit aee9d92
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@

def pytest_collection_modifyitems(config, items):
if sys.platform != "linux":
if not config.option.keyword or (
config.option.keyword and "test_integration_vllm" in config.option.keyword
):
print(
"WARNING: test_integration_vllm tests are skipped because vLLM only supports Linux platform (including WSL)."
)
skip_vllm = pytest.mark.skip(reason="vLLM models can only be run on Linux.")
for item in items:
if "test_integration_vllm" in item.nodeid:
item.add_marker(skip_vllm)
print(
f"WARNING: {item.nodeid} is skipped because vLLM only supports Linux platform (including WSL)."
)

0 comments on commit aee9d92

Please sign in to comment.