MCPcopy Index your code
hub / github.com/python/mypy / test_topsort_linear_chain

Method test_topsort_linear_chain

mypy/test/testgraph.py:49–56  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

47 assert_equal(res, [{a, b, c}])
48
49 def test_topsort_linear_chain(self) -> None:
50 a = frozenset({"A"})
51 b = frozenset({"B"})
52 c = frozenset({"C"})
53 d = frozenset({"D"})
54 data: dict[AbstractSet[str], set[AbstractSet[str]]] = {a: {b}, b: {c}, c: {d}, d: set()}
55 res = list(topsort(data))
56 assert_equal(res, [{d}, {c}, {b}, {a}])
57
58 def test_topsort_self_dependency(self) -> None:
59 a = frozenset({"A"})

Callers

nothing calls this directly

Calls 5

topsortClass · 0.90
assert_equalFunction · 0.90
frozensetClass · 0.85
setClass · 0.85
listClass · 0.85

Tested by

no test coverage detected