Skip to content

Commit a913ebd

Browse files
authored
test: add wrong number of argument tests
1 parent 572154d commit a913ebd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test-data/unit/check-type-aliases.test

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,10 @@ t1: T1 # E: Variable "__main__.T1" is not valid as a type \
11051105
T3 = TypeAliasType("T3", -1) # E: Invalid type: try using Literal[-1] instead?
11061106
t3: T3
11071107
reveal_type(t3) # N: Revealed type is "Any"
1108+
1109+
T4 = TypeAliasType("T4") # E: Missing positional argument "value" in call to "TypeAliasType"
1110+
T5 = TypeAliasType("T5", int, str) # E: Too many positional arguments for "TypeAliasType" \
1111+
# E: Argument 3 to "TypeAliasType" has incompatible type "Type[str]"; expected "Tuple[Union[TypeVar?, ParamSpec?, TypeVarTuple?], ...]"
11081112
[builtins fixtures/tuple.pyi]
11091113
[typing fixtures/typing-full.pyi]
11101114

0 commit comments

Comments
 (0)