Skip to content

Commit 1ed8361

Browse files
Added all test cases
1 parent 4dc1890 commit 1ed8361

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/test/test_ctypes/test_arrays.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from ctypes import (Structure, Array, ARRAY, sizeof, addressof,
55
create_string_buffer, create_unicode_buffer,
66
c_char, c_wchar, c_byte, c_ubyte, c_short, c_ushort, c_int, c_uint,
7-
c_long, c_ulonglong, c_float, c_double, c_longdouble, POINTER)
7+
c_long, c_ulonglong, c_float, c_double, c_longdouble)
88
from test.support import bigmemtest, _2G, threading_helper, Py_GIL_DISABLED
99
from ._support import (_CData, PyCArrayType, Py_TPFLAGS_DISALLOW_INSTANTIATION,
1010
Py_TPFLAGS_IMMUTABLETYPE)
@@ -191,16 +191,16 @@ class S2(Structure):
191191
a.__class__ = B
192192

193193
def test_ctypes_array_class_assignment_pointer_arrays(self):
194+
from ctypes import POINTER
194195
A = POINTER(c_int) * 2
195196
B = POINTER(c_int) * 2
196197
a = A()
197198
a.__class__ = B
198199

199200
def test_ctypes_array_from_param_incompatible(self):
200201
A = c_int * 3
201-
B = c_double * 3
202202
with self.assertRaises(TypeError):
203-
A.from_param(B())
203+
A.from_param(object())
204204

205205
def test_step_overflow(self):
206206
a = (c_int * 5)()

0 commit comments

Comments
 (0)