Fix Test* mixin classes being collected as standalone pytest tests (#20417)

This commit is contained in:
Pai Liu
2026-03-13 12:18:45 +11:00
committed by GitHub
parent 9865f11421
commit 65dd08153d
9 changed files with 45 additions and 41 deletions

View File

@@ -3,7 +3,8 @@ import json
import requests
class TestEBNFConstrainedMixin:
class EBNFConstrainedMixin:
ebnf_grammar = 'root ::= "test"' # Default grammar
def _run_decode_ebnf(

View File

@@ -5,7 +5,8 @@ import openai
import requests
class TestJSONConstrainedMixin:
class JSONConstrainedMixin:
json_schema = json.dumps(
{
"type": "object",

View File

@@ -3,7 +3,8 @@ import json
import requests
class TestRegexConstrainedMixin:
class RegexConstrainedMixin:
def _run_decode_regex(
self,
regex,

View File

@@ -2056,6 +2056,7 @@ def _distributed_worker(rank, world_size, backend, port, func, result_queue, kwa
class CustomTestCase(unittest.TestCase):
def _callTestMethod(self, method):
max_retry = envs.SGLANG_TEST_MAX_RETRY.get()
if max_retry is None: