chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:17:40 +08:00
commit f1825c8ceb
10096 changed files with 2364182 additions and 0 deletions
@@ -0,0 +1,37 @@
import sys
import pytest
# skip the test if vllm is installed
HAS_VLLM = False
try:
import vllm # noqa: F401
HAS_VLLM = True
except ImportError:
pass
@pytest.mark.skipif(not HAS_VLLM, reason="vllm is not installed")
def test_serve_llm_import_does_not_error():
# expected ImportError because of missing
# dependencies without ray[llm] dependencies
with pytest.raises(ImportError):
import ray.serve.llm # noqa: F401
with pytest.raises(ImportError):
from ray.serve.llm import (
LLMConfig, # noqa: F401
)
with pytest.raises(ImportError):
from ray.serve.llm.deployment import (
LLMServer, # noqa: F401
)
with pytest.raises(ImportError):
from ray.serve.llm import (
build_llm_deployment, # noqa: F401
build_openai_app, # noqa: F401
)
if __name__ == "__main__":
sys.exit(pytest.main(["-v", __file__]))