Skip to content

Commit d52df05

Browse files
authored
tests: a few better ids (#1058)
See #1057. --------- Signed-off-by: Henry Schreiner <[email protected]>
1 parent 604e3d6 commit d52df05

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ markers = [
160160
"isolated: Needs an isolated virtualenv",
161161
"network: Needs a network connection to setup or run",
162162
"setuptools: Tests setuptools integration",
163+
"upstream: Intended to check our own development",
163164
"virtualenv: Needs a virtualenv",
164165
]
165166
norecursedirs = ["tests/packages/**"]

tests/test_schema.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
DIR = Path(__file__).parent.resolve()
1515

16+
pytestmark = pytest.mark.upstream
17+
1618

1719
def test_compare_schemas():
1820
"""
@@ -28,7 +30,9 @@ def test_compare_schemas():
2830
]
2931

3032

31-
@pytest.mark.parametrize("filepath", SCHEMAS)
33+
@pytest.mark.parametrize(
34+
"filepath", SCHEMAS, ids=lambda x: str(x.relative_to(DIR.parent).parent)
35+
)
3236
def test_valid_schemas_files(filepath: Path) -> None:
3337
api = pytest.importorskip("validate_pyproject.api")
3438

tests/test_simplest_c.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ def test_pep517_sdist(tmp_path, monkeypatch):
4545
@pytest.mark.compile
4646
@pytest.mark.configure
4747
@pytest.mark.parametrize(
48-
"component", [[], ["PythonModule"], ["PythonModule", "Generated"]]
48+
"component",
49+
[
50+
pytest.param([], id="all"),
51+
pytest.param(["PythonModule"], id="one"),
52+
pytest.param(["PythonModule", "Generated"], id="two"),
53+
],
4954
)
5055
def test_pep517_wheel(tmp_path, monkeypatch, virtualenv, component):
5156
dist = tmp_path / "dist"

0 commit comments

Comments
 (0)