[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:
co-authored by
Andreas Karatzas
parent
2bc902eb0f
commit
2d7dd0e5c1
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user