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

Method assert_expand

mypy/test/testtypes.py:267–277  ·  view source on GitHub ↗
(
        self, orig: Type, map_items: list[tuple[TypeVarId, Type]], result: Type
    )

Source from the content-addressed store, hash-verified

265 # multiple arguments
266
267 def assert_expand(
268 self, orig: Type, map_items: list[tuple[TypeVarId, Type]], result: Type
269 ) -> None:
270 lower_bounds = {}
271
272 for id, t in map_items:
273 lower_bounds[id] = t
274
275 exp = mypy.expandtype.expand_type(orig, lower_bounds)
276 # Remove erased tags (asterisks).
277 assert_equal(str(exp).replace("*", ""), str(result))
278
279 # erase_type
280

Calls 4

assert_equalFunction · 0.90
strClass · 0.85
expand_typeMethod · 0.80
replaceMethod · 0.80

Tested by

no test coverage detected