(self)
| 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 |
nothing calls this directly
no test coverage detected