[smg][ci] migrate chat completions tests to new infrastructure and build wheel once and share via artifact (#16709)

This commit is contained in:
Simo Lin
2026-01-08 06:29:23 -08:00
committed by GitHub
parent b6e8a0d851
commit 2f8a36347c
3 changed files with 406 additions and 71 deletions
+15 -2
View File
@@ -118,8 +118,21 @@ def pytest_collection_modifyitems(
for item in items:
# Extract model from marker or use default
model_marker = item.get_closest_marker(PARAM_MODEL)
model_id = model_marker.args[0] if model_marker and model_marker.args else None
# First check the class directly (handles inheritance correctly)
model_id = None
if hasattr(item, "cls") and item.cls is not None:
for marker in (
item.cls.pytestmark if hasattr(item.cls, "pytestmark") else []
):
if marker.name == PARAM_MODEL and marker.args:
model_id = marker.args[0]
break
# Fall back to get_closest_marker for method-level markers
if model_id is None:
model_marker = item.get_closest_marker(PARAM_MODEL)
model_id = (
model_marker.args[0] if model_marker and model_marker.args else None
)
# Check parametrize for model
if model_id is None: