Skip to content

Commit 2a70a62

Browse files
committed
fix artifact test
1 parent 2fa818a commit 2a70a62

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/canary_pyt/tests/canary_pyt/generator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@ def test_adapter_apply_populates_model_from_calls(tmp_path: Path) -> None:
208208
def test_artifact_upon_mapping_success_failure(tmp_path: Path) -> None:
209209
m = make_model(tmp_path, "x.pyt")
210210
a = PYTAdapter(m)
211-
a.f_artifact("out.txt", upon="success")
212-
a.f_artifact("err.txt", upon="failure")
211+
a.f_artifact("baz.txt", upon="success")
212+
a.f_artifact("spam.txt", upon="failure")
213213
specs = lock_model(m)
214-
arts = specs[0].artifacts
215-
assert [x.when for x in arts] == ["on_success", "on_failure"]
214+
w = {a.when for a in specs[0].artifacts if a.pattern in ("baz.txt", "spam.txt")}
215+
assert w == {"on_success", "on_failure"}
216216

217217

218218
def test_artifact_invalid_upon_raises(tmp_path: Path) -> None:

0 commit comments

Comments
 (0)