@@ -2,8 +2,8 @@ |
|
|
2 |
2 |
from ctypes import * |
3 |
3 |
from ctypes.test import need_symbol |
4 |
4 |
from struct import calcsize |
5 |
|
-import _testcapi |
6 |
5 |
import _ctypes_test |
|
6 |
+import test.support |
7 |
7 |
|
8 |
8 |
class SubclassesTest(unittest.TestCase): |
9 |
9 |
def test_subclass(self): |
@@ -202,7 +202,10 @@ class X(Structure): |
|
|
202 |
202 |
"_pack_": -1} |
203 |
203 |
self.assertRaises(ValueError, type(Structure), "X", (Structure,), d) |
204 |
204 |
|
|
205 |
+@test.support.cpython_only |
|
206 |
+def test_packed_c_limits(self): |
205 |
207 |
# Issue 15989 |
|
208 |
+import _testcapi |
206 |
209 |
d = {"_fields_": [("a", c_byte)], |
207 |
210 |
"_pack_": _testcapi.INT_MAX + 1} |
208 |
211 |
self.assertRaises(ValueError, type(Structure), "X", (Structure,), d) |