MCPcopy
hub / github.com/django/django / test_circular_graph_2

Method test_circular_graph_2

tests/migrations/test_graph.py:165–175  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

163 graph.ensure_not_cyclic()
164
165 def test_circular_graph_2(self):
166 graph = MigrationGraph()
167 graph.add_node(("A", "0001"), None)
168 graph.add_node(("C", "0001"), None)
169 graph.add_node(("B", "0001"), None)
170 graph.add_dependency("A.0001", ("A", "0001"), ("B", "0001"))
171 graph.add_dependency("B.0001", ("B", "0001"), ("A", "0001"))
172 graph.add_dependency("C.0001", ("C", "0001"), ("B", "0001"))
173
174 with self.assertRaises(CircularDependencyError):
175 graph.ensure_not_cyclic()
176
177 def test_iterative_dfs(self):
178 graph = MigrationGraph()

Callers

nothing calls this directly

Calls 4

add_nodeMethod · 0.95
add_dependencyMethod · 0.95
ensure_not_cyclicMethod · 0.95
MigrationGraphClass · 0.90

Tested by

no test coverage detected