Skip to content

Commit 3f5d045

Browse files
committed
Add **kwargs test for ctypes.Array constructor
1 parent 54504cc commit 3f5d045

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test-data/unit/check-ctypes.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,12 @@ reveal_type(intarr6(1, ctypes.c_int(2), *c_int_values)) # E: Revealed type is '
171171
float_values = [1.0, 2.0, 3.0, 4.0]
172172
intarr4(*float_values) # E: Array constructor argument 1 of type "builtins.list[builtins.float*]" is not convertible to the array element type "Iterable[ctypes.c_int]"
173173
[builtins fixtures/floatdict.pyi]
174+
175+
[case testCtypesArrayConstructorKwargs]
176+
import ctypes
177+
intarr4 = ctypes.c_int * 4
178+
179+
x = {"a": 1, "b": 2}
180+
intarr4(**x) # E: Too many arguments for "Array"
181+
182+
[builtins fixtures/floatdict.pyi]

0 commit comments

Comments
 (0)