[router][CI] Clean up imports and prints statements in sgl-router/py_test (#12024)

This commit is contained in:
Chang Su
2025-10-23 11:56:57 -07:00
committed by GitHub
parent 8bd26dd4e6
commit 28b8a4064d
31 changed files with 115 additions and 153 deletions

View File

@@ -6,17 +6,11 @@ python3 -m unittest openai_server.features.test_enable_thinking.TestEnableThinki
python3 -m unittest openai_server.features.test_enable_thinking.TestEnableThinking.test_stream_chat_completion_without_reasoning
"""
import asyncio
import json
import os
import sys
import time
import unittest
# CHANGE: Import router launcher instead of server launcher
from pathlib import Path
import openai
import requests
_TEST_DIR = Path(__file__).parent
@@ -24,10 +18,8 @@ sys.path.insert(0, str(_TEST_DIR.parent))
from fixtures import popen_launch_workers_and_router
from util import (
DEFAULT_ENABLE_THINKING_MODEL_PATH,
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
DEFAULT_URL_FOR_TEST,
CustomTestCase,
get_tokenizer,
kill_process_tree,
)
@@ -131,7 +123,6 @@ class TestEnableThinking(CustomTestCase):
has_reasoning = False
has_content = False
print("\n=== Stream With Reasoning ===")
for line in response.iter_lines():
if line:
line = line.decode("utf-8")
@@ -176,7 +167,6 @@ class TestEnableThinking(CustomTestCase):
has_reasoning = False
has_content = False
print("\n=== Stream Without Reasoning ===")
for line in response.iter_lines():
if line:
line = line.decode("utf-8")