Update CI workflows (#1210)
This commit is contained in:
@@ -5,7 +5,11 @@ from multiprocessing import Process
|
||||
import requests
|
||||
|
||||
from sglang.srt.utils import kill_child_process
|
||||
from sglang.test.test_utils import DEFAULT_MODEL_NAME_FOR_TEST, popen_launch_server
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_MODEL_NAME_FOR_TEST,
|
||||
DEFAULT_URL_FOR_UNIT_TEST,
|
||||
popen_launch_server,
|
||||
)
|
||||
|
||||
|
||||
class TestBatchPenalizerE2E(unittest.TestCase):
|
||||
@@ -13,7 +17,7 @@ class TestBatchPenalizerE2E(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.model = DEFAULT_MODEL_NAME_FOR_TEST
|
||||
cls.base_url = f"http://127.0.0.1:{8157}"
|
||||
cls.base_url = DEFAULT_URL_FOR_UNIT_TEST
|
||||
cls.process = popen_launch_server(
|
||||
cls.model,
|
||||
cls.base_url,
|
||||
|
||||
@@ -67,7 +67,7 @@ class TestOpenAIVisionServer(unittest.TestCase):
|
||||
assert response.choices[0].message.role == "assistant"
|
||||
text = response.choices[0].message.content
|
||||
assert isinstance(text, str)
|
||||
assert "car" in text or "taxi" in text, text
|
||||
assert "logo" in text, text
|
||||
assert response.id
|
||||
assert response.created
|
||||
assert response.usage.prompt_tokens > 0
|
||||
|
||||
Reference in New Issue
Block a user