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

Method assert_solve

mypy/test/testsolve.py:251–265  ·  view source on GitHub ↗
(
        self,
        vars: list[TypeVarLikeType],
        constraints: list[Constraint],
        results: list[None | Type],
        free_vars: list[TypeVarLikeType] | None = None,
        allow_polymorphic: bool = False,
    )

Source from the content-addressed store, hash-verified

249 )
250
251 def assert_solve(
252 self,
253 vars: list[TypeVarLikeType],
254 constraints: list[Constraint],
255 results: list[None | Type],
256 free_vars: list[TypeVarLikeType] | None = None,
257 allow_polymorphic: bool = False,
258 ) -> None:
259 if free_vars is None:
260 free_vars = []
261 actual, actual_free = solve_constraints(
262 vars, constraints, allow_polymorphic=allow_polymorphic
263 )
264 assert_equal(actual, results)
265 assert_equal(actual_free, free_vars)
266
267 def assert_transitive_closure(
268 self,

Calls 2

solve_constraintsFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected