Repository: scikit-build/scikit-build-core
Pull request #1058 (2025-04-28 03:40:48)

tests: a few better ids
See #1057.


LecrisUT: We should also add a marker for `upstream` or such to indicate that a test is only meant for upstream development. Currently I can only think of schema files that would fit this criteria

Patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 591658b..96b836e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -30,7 +30,7 @@ jobs:
       - uses: actions/setup-python@v5
         with:
           python-version: "3.12"
-      - uses: astral-sh/setup-uv@v5
+      - uses: astral-sh/setup-uv@v6
       - name: Install nox
         run: uv tool install nox
       - uses: pre-commit/action@v3.0.1
@@ -116,7 +116,7 @@ jobs:
           python-version: ${{ matrix.python-version }}
           allow-prereleases: true
 
-      - uses: astral-sh/setup-uv@v5
+      - uses: astral-sh/setup-uv@v6
         if: matrix.python-version != 'pypy-3.8'
 
       - name: Install package (uv)
@@ -177,7 +177,7 @@ jobs:
         with:
           python-version: ${{ matrix.python-version }}
 
-      - uses: astral-sh/setup-uv@v5
+      - uses: astral-sh/setup-uv@v6
 
       # The min requirements are not compatible with some of the extra test
       # deps, so limit to just built-in deps.
@@ -347,7 +347,7 @@ jobs:
           fetch-depth: 0
           persist-credentials: false
 
-      - uses: astral-sh/setup-uv@v5
+      - uses: astral-sh/setup-uv@v6
 
       - uses: wntrblm/nox@2025.02.09
         with:
diff --git a/pyproject.toml b/pyproject.toml
index f6b4968..62c17cb 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -160,6 +160,7 @@ markers = [
     "isolated: Needs an isolated virtualenv",
     "network: Needs a network connection to setup or run",
     "setuptools: Tests setuptools integration",
+    "upstream: Intended to check our own development",
     "virtualenv: Needs a virtualenv",
 ]
 norecursedirs = ["tests/packages/**"]


Test patch:
diff --git a/tests/test_schema.py b/tests/test_schema.py
index e68c9de..914f357 100644
--- a/tests/test_schema.py
+++ b/tests/test_schema.py
@@ -13,6 +13,8 @@ from scikit_build_core.settings.skbuild_schema import (
 
 DIR = Path(__file__).parent.resolve()
 
+pytestmark = pytest.mark.upstream
+
 
 def test_compare_schemas():
     """
@@ -28,7 +30,9 @@ SCHEMAS = [
 ]
 
 
-@pytest.mark.parametrize("filepath", SCHEMAS)
+@pytest.mark.parametrize(
+    "filepath", SCHEMAS, ids=lambda x: str(x.relative_to(DIR.parent).parent)
+)
 def test_valid_schemas_files(filepath: Path) -> None:
     api = pytest.importorskip("validate_pyproject.api")
 
diff --git a/tests/test_simplest_c.py b/tests/test_simplest_c.py
index 328147e..d186511 100644
--- a/tests/test_simplest_c.py
+++ b/tests/test_simplest_c.py
@@ -45,7 +45,12 @@ def test_pep517_sdist(tmp_path, monkeypatch):
 @pytest.mark.compile
 @pytest.mark.configure
 @pytest.mark.parametrize(
-    "component", [[], ["PythonModule"], ["PythonModule", "Generated"]]
+    "component",
+    [
+        pytest.param([], id="all"),
+        pytest.param(["PythonModule"], id="one"),
+        pytest.param(["PythonModule", "Generated"], id="two"),
+    ],
 )
 def test_pep517_wheel(tmp_path, monkeypatch, virtualenv, component):
     dist = tmp_path / "dist"