MCPcopy Index your code
hub / github.com/python/cpython / test_invalid_nodes_in_done

Method test_invalid_nodes_in_done

Lib/test/test_graphlib.py:158–168  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

156 ts.prepare()
157
158 def test_invalid_nodes_in_done(self):
159 ts = graphlib.TopologicalSorter()
160 ts.add(1, 2, 3, 4)
161 ts.add(2, 3, 4)
162 ts.prepare()
163 ts.get_ready()
164
165 with self.assertRaisesRegex(ValueError, "node 2 was not passed out"):
166 ts.done(2)
167 with self.assertRaisesRegex(ValueError, r"node 24 was not added using add\(\)"):
168 ts.done(24)
169
170 def test_done(self):
171 ts = graphlib.TopologicalSorter()

Callers

nothing calls this directly

Calls 5

addMethod · 0.95
prepareMethod · 0.95
get_readyMethod · 0.95
doneMethod · 0.95
assertRaisesRegexMethod · 0.80

Tested by

no test coverage detected