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

Method test_graph_with_iterables

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

Source from the content-addressed store, hash-verified

95 self.assertEqual([*ts.static_order()], [2, 1])
96
97 def test_graph_with_iterables(self):
98 dependson = (2 * x + 1 for x in range(5))
99 ts = graphlib.TopologicalSorter({0: dependson})
100 self.assertEqual(list(ts.static_order()), [1, 3, 5, 7, 9, 0])
101
102 def test_add_dependencies_for_same_node_incrementally(self):
103 # Test same node multiple times

Callers

nothing calls this directly

Calls 3

static_orderMethod · 0.95
listClass · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected