(self)
| 3162 | ) |
| 3163 | |
| 3164 | def test_overload_signature(self) -> None: |
| 3165 | # The same argument as both positional-only and pos-or-kw in |
| 3166 | # different overloads previously produced incorrect signatures |
| 3167 | source = """ |
| 3168 | from typing import overload |
| 3169 | @overload |
| 3170 | def myfunction(arg: int) -> None: ... |
| 3171 | @overload |
| 3172 | def myfunction(arg: str, /) -> None: ... |
| 3173 | """ |
| 3174 | result = build_helper(source) |
| 3175 | stub = result.files["__main__"].names["myfunction"].node |
| 3176 | assert isinstance(stub, nodes.OverloadedFuncDef) |
| 3177 | sig = mypy.stubtest.Signature.from_overloadedfuncdef(stub) |
| 3178 | assert str(sig) == "def (arg: int | str)" |
| 3179 | |
| 3180 | def test_config_file(self) -> None: |
| 3181 | runtime = "temp = 5\n" |
nothing calls this directly
no test coverage detected