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

Method test_topsort_self_dependency

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

Source from the content-addressed store, hash-verified

56 assert_equal(res, [{d}, {c}, {b}, {a}])
57
58 def test_topsort_self_dependency(self) -> None:
59 a = frozenset({"A"})
60 b = frozenset({"B"})
61 data: dict[AbstractSet[str], set[AbstractSet[str]]] = {a: {a, b}, b: set()}
62 res = list(topsort(data))
63 assert_equal(res, [{b}, {a}])
64
65 def test_topsort_orphan_diamond(self) -> None:
66 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