Skip to content

Commit a9d9a40

Browse files
glandiumjcristau
authored andcommitted
Adjust test fixture to make metadata.name equivalent to label
1 parent 06c2b53 commit a9d9a40

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/pytest-taskgraph/src/pytest_taskgraph/fixtures/gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def fake_loader(kind, path, config, parameters, loaded_tasks):
3030
"attributes": {"_tasknum": str(i)},
3131
"task": {
3232
"i": i,
33-
"metadata": {"name": f"t-{i}"},
33+
"metadata": {"name": f"{kind}-t-{i}"},
3434
"deadline": "soon",
3535
},
3636
"dependencies": dependencies,

test/test_generator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,10 @@ def test_load_tasks_for_kind(monkeypatch):
184184
"_example-kind",
185185
"/root",
186186
)
187-
assert "t-1" in tasks and tasks["t-1"].label == "_example-kind-t-1"
187+
assert (
188+
"_example-kind-t-1" in tasks
189+
and tasks["_example-kind-t-1"].label == "_example-kind-t-1"
190+
)
188191

189192

190193
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)