Unverified Commit b21d3843 authored by Flora Feng's avatar Flora Feng Committed by GitHub
Browse files

[Refactor] Relocate endpoint tests to mirror serving code directory structure (#37504)


Signed-off-by: default avatarsfeng33 <4florafeng@gmail.com>
parent e3126cd1
...@@ -336,11 +336,10 @@ apply_rocm_test_overrides() { ...@@ -336,11 +336,10 @@ apply_rocm_test_overrides() {
--ignore=entrypoints/openai/chat_completion/test_audio.py \ --ignore=entrypoints/openai/chat_completion/test_audio.py \
--ignore=entrypoints/openai/completion/test_shutdown.py \ --ignore=entrypoints/openai/completion/test_shutdown.py \
--ignore=entrypoints/openai/test_completion.py \ --ignore=entrypoints/openai/test_completion.py \
--ignore=entrypoints/openai/test_models.py \ --ignore=entrypoints/openai/models/test_models.py \
--ignore=entrypoints/openai/test_lora_adapters.py \ --ignore=entrypoints/openai/test_lora_adapters.py \
--ignore=entrypoints/openai/test_return_tokens_as_ids.py \ --ignore=entrypoints/openai/test_return_tokens_as_ids.py \
--ignore=entrypoints/openai/chat_completion/test_root_path.py \ --ignore=entrypoints/openai/chat_completion/test_root_path.py \
--ignore=entrypoints/openai/test_tokenization.py \
--ignore=entrypoints/openai/completion/test_prompt_validation.py "} --ignore=entrypoints/openai/completion/test_prompt_validation.py "}
fi fi
......
...@@ -121,7 +121,7 @@ python = "./.venv" ...@@ -121,7 +121,7 @@ python = "./.venv"
# these files may be written in non english words # these files may be written in non english words
extend-exclude = ["tests/models/fixtures/*", "tests/prompts/*", "tests/tokenizers_/*", extend-exclude = ["tests/models/fixtures/*", "tests/prompts/*", "tests/tokenizers_/*",
"benchmarks/sonnet.txt", "tests/lora/data/*", "examples/pooling/token_embed/*", "build/*", "benchmarks/sonnet.txt", "tests/lora/data/*", "examples/pooling/token_embed/*", "build/*",
"vllm/third_party/*", "vllm/entrypoints/serve/instrumentator/static/*", "tests/entrypoints/openai/test_transcription_validation.py", "vllm/third_party/*", "vllm/entrypoints/serve/instrumentator/static/*", "tests/entrypoints/openai/speech_to_text/test_transcription_validation.py",
"docs/governance/process.md", "tests/v1/engine/test_fast_incdec_prefix_err.py", ".git/*"] "docs/governance/process.md", "tests/v1/engine/test_fast_incdec_prefix_err.py", ".git/*"]
ignore-hidden = false ignore-hidden = false
......
...@@ -5,7 +5,7 @@ import anthropic ...@@ -5,7 +5,7 @@ import anthropic
import pytest import pytest
import pytest_asyncio import pytest_asyncio
from ...utils import RemoteOpenAIServer from tests.utils import RemoteOpenAIServer
MODEL_NAME = "Qwen/Qwen3-0.6B" MODEL_NAME = "Qwen/Qwen3-0.6B"
......
...@@ -5,7 +5,7 @@ import openai # use the official client for correctness check ...@@ -5,7 +5,7 @@ import openai # use the official client for correctness check
import pytest import pytest
import pytest_asyncio import pytest_asyncio
from ...utils import RemoteOpenAIServer from tests.utils import RemoteOpenAIServer
# any model with a chat template should work here # any model with a chat template should work here
MODEL_NAME = "Qwen/Qwen3-0.6B" MODEL_NAME = "Qwen/Qwen3-0.6B"
......
...@@ -11,11 +11,10 @@ import pybase64 as base64 ...@@ -11,11 +11,10 @@ import pybase64 as base64
import pytest import pytest
import websockets import websockets
from tests.entrypoints.openai.conftest import add_attention_backend
from tests.utils import ROCM_ENV_OVERRIDES, ROCM_EXTRA_ARGS, RemoteOpenAIServer
from vllm.assets.audio import AudioAsset from vllm.assets.audio import AudioAsset
from ...utils import ROCM_ENV_OVERRIDES, ROCM_EXTRA_ARGS, RemoteOpenAIServer
from .conftest import add_attention_backend
MISTRAL_FORMAT_ARGS = [ MISTRAL_FORMAT_ARGS = [
"--tokenizer_mode", "--tokenizer_mode",
"mistral", "mistral",
......
...@@ -42,7 +42,7 @@ class TestMCPToolServerUnit: ...@@ -42,7 +42,7 @@ class TestMCPToolServerUnit:
Note: The wildcard "*" is normalized to None by Note: The wildcard "*" is normalized to None by
_extract_allowed_tools_from_mcp_requests before reaching this layer, _extract_allowed_tools_from_mcp_requests before reaching this layer,
so we only test None and specific tool filtering here. so we only test None and specific tool filtering here.
See test_serving_responses.py for "*" normalization tests. See responses/test_serving_responses.py for "*" normalization tests.
""" """
def test_get_tool_description(self): def test_get_tool_description(self):
......
...@@ -6,8 +6,8 @@ import json ...@@ -6,8 +6,8 @@ import json
import pytest import pytest
from ...utils import ROCM_ENV_OVERRIDES, ROCM_EXTRA_ARGS, RemoteOpenAIServer from tests.entrypoints.openai.conftest import add_attention_backend
from .conftest import add_attention_backend from tests.utils import ROCM_ENV_OVERRIDES, ROCM_EXTRA_ARGS, RemoteOpenAIServer
MISTRAL_FORMAT_ARGS = [ MISTRAL_FORMAT_ARGS = [
"--tokenizer_mode", "--tokenizer_mode",
......
...@@ -13,7 +13,7 @@ import pytest ...@@ -13,7 +13,7 @@ import pytest
import pytest_asyncio import pytest_asyncio
import soundfile as sf import soundfile as sf
from ...utils import RemoteOpenAIServer from tests.utils import RemoteOpenAIServer
MODEL_NAME = "openai/whisper-large-v3-turbo" MODEL_NAME = "openai/whisper-large-v3-turbo"
......
...@@ -14,8 +14,8 @@ import pytest ...@@ -14,8 +14,8 @@ import pytest
import pytest_asyncio import pytest_asyncio
import soundfile as sf import soundfile as sf
from ...utils import RemoteOpenAIServer from tests.entrypoints.openai.conftest import add_attention_backend
from .conftest import add_attention_backend from tests.utils import RemoteOpenAIServer
SERVER_ARGS = ["--enforce-eager"] SERVER_ARGS = ["--enforce-eager"]
......
...@@ -5,10 +5,9 @@ import pytest ...@@ -5,10 +5,9 @@ import pytest
import pytest_asyncio import pytest_asyncio
import requests import requests
from tests.utils import RemoteOpenAIServer
from vllm.tokenizers import get_tokenizer from vllm.tokenizers import get_tokenizer
from ...utils import RemoteOpenAIServer
# any model with a chat template should work here # any model with a chat template should work here
MODEL_NAME = "HuggingFaceH4/zephyr-7b-beta" MODEL_NAME = "HuggingFaceH4/zephyr-7b-beta"
......
...@@ -13,7 +13,7 @@ import json ...@@ -13,7 +13,7 @@ import json
import pytest import pytest
import requests import requests
from ...utils import RemoteOpenAIServer from tests.utils import RemoteOpenAIServer
MODEL_NAME = "Qwen/Qwen2.5-VL-3B-Instruct" MODEL_NAME = "Qwen/Qwen2.5-VL-3B-Instruct"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment