Skip to content

Commit b14eb3d

Browse files
author
thomas.heller
committed
Make this test work with older Python releases where struct has no 't' format character.
git-svn-id: http://svn.python.org/projects/python/trunk@55828 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 4b7c371 commit b14eb3d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/ctypes/test/test_numbers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ def test_integers(self):
117117

118118
def test_sizes(self):
119119
for t in signed_types + unsigned_types + float_types + bool_types:
120-
size = struct.calcsize(t._type_)
120+
try:
121+
size = struct.calcsize(t._type_)
122+
except struct.error:
123+
continue
121124
# sizeof of the type...
122125
self.failUnlessEqual(sizeof(t), size)
123126
# and sizeof of an instance

0 commit comments

Comments
 (0)