[Bugfix][CI] Report subprocess test skips as skips, not passes (#58701)

Signed-off-by: Stefan Koncarevic <Stefan.Koncarevic@amd.com>
Co-authored-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
stefankoncarevic
2026-09-25 14:44:49 -05:00
committed by GitHub
co-authored by Andreas Karatzas
parent 2bc902eb0f
commit 2d7dd0e5c1
2 changed files with 25 additions and 8 deletions
+13
View File
@@ -2,10 +2,14 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""Tests for spawn_new_process_for_each_test decorator."""
from pathlib import Path
import pytest
from tests.utils import spawn_new_process_for_each_test
pytest_plugins = ["pytester"]
@spawn_new_process_for_each_test
def test_spawn_decorator_passing():
@@ -26,6 +30,15 @@ def test_spawn_decorator_skip():
pytest.skip("intentional skip")
def test_spawn_decorator_reports_skip(pytester):
"""A child skip must remain a skip in the parent pytest report."""
result = pytester.runpytest_subprocess(
f"{Path(__file__).resolve()}::test_spawn_decorator_skip", "-rs"
)
result.assert_outcomes(skipped=1)
result.stdout.fnmatch_lines(["SKIPPED *intentional skip"])
@spawn_new_process_for_each_test
@pytest.mark.parametrize("x,y,expected", [(1, 2, 3), (0, 0, 0)])
def test_spawn_decorator_parametrized(x, y, expected):