MCPcopy
hub / github.com/marimo-team/marimo / test_graph_two_chains

Function test_graph_two_chains

tests/_runtime/test_dataflow.py:32–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30
31
32def test_graph_two_chains() -> None:
33 graph = dataflow.DirectedGraph()
34 code = "x = 0"
35 first_cell = parse_cell(code)
36 graph.register_cell("0", first_cell)
37
38 code = "y = x"
39 second_cell = parse_cell(code)
40 graph.register_cell("1", second_cell)
41
42 code = "z = y\nzz = x"
43 third_cell = parse_cell(code)
44 graph.register_cell("2", third_cell)
45
46 # 0 --> 1 --> 2, 0 --> 2
47 assert graph.cells == {"0": first_cell, "1": second_cell, "2": third_cell}
48 assert graph.parents == {"0": set(), "1": {"0"}, "2": {"0", "1"}}
49 assert graph.children == {
50 "0": {"1", "2"},
51 "1": {"2"},
52 "2": set(),
53 }
54
55
56def test_graph_unconnected() -> None:

Callers

nothing calls this directly

Calls 1

register_cellMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…