Skip to content

Commit 30e1a36

Browse files
author
Joeperdefloep
committed
improved test xarray-contrib#183
1 parent 4aa87fb commit 30e1a36

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

xsimlab/tests/test_model.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,16 @@ class C:
341341
class D:
342342
pass
343343

344+
@xs.process
345+
class E:
346+
pass
347+
344348
model = xs.Model(
345-
{"a": A, "b": B, "c": C, "d": D},
346-
custom_dependencies={"d": "c", "c": "b", "b": "a"},
349+
{"a": A, "b": B, "c": C, "d": D, "e": E},
350+
custom_dependencies={"d": "c", "c": "b", "b": {"a", "e"}},
347351
)
348352
model = model.drop_processes(["b", "c"])
349-
assert model.dependent_processes["d"] == ["a"]
353+
assert set(model.dependent_processes["d"]) == {"a", "e"}
350354

351355
def test_visualize(self, model):
352356
pytest.importorskip("graphviz")

0 commit comments

Comments
 (0)