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

Method test_simple

mypy/test/testtypes.py:1486–1500  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1484 self.fx = TypeFixture()
1485
1486 def test_simple(self) -> None:
1487 fx = self.fx
1488 ov = self.make_overload([[("x", fx.anyt, ARG_NAMED)], [("y", fx.anyt, ARG_NAMED)]])
1489 # Match first only
1490 self.assert_find_shallow_matching_overload_item(ov, make_call(("foo", "x")), 0)
1491 # Match second only
1492 self.assert_find_shallow_matching_overload_item(ov, make_call(("foo", "y")), 1)
1493 # No match -- invalid keyword arg name
1494 self.assert_find_shallow_matching_overload_item(ov, make_call(("foo", "z")), 1)
1495 # No match -- missing arg
1496 self.assert_find_shallow_matching_overload_item(ov, make_call(), 1)
1497 # No match -- extra arg
1498 self.assert_find_shallow_matching_overload_item(
1499 ov, make_call(("foo", "x"), ("foo", "z")), 1
1500 )
1501
1502 def test_match_using_types(self) -> None:
1503 fx = self.fx

Callers

nothing calls this directly

Calls 3

make_overloadMethod · 0.95
make_callFunction · 0.85

Tested by

no test coverage detected