Commit 1b9e0418 authored by Thomas Heller's avatar Thomas Heller

Make this test work with older Python releases where struct has no 't' format character.

parent b53940f2
......@@ -117,7 +117,10 @@ class NumberTestCase(unittest.TestCase):
def test_sizes(self):
for t in signed_types + unsigned_types + float_types + bool_types:
size = struct.calcsize(t._type_)
try:
size = struct.calcsize(t._type_)
except struct.error:
continue
# sizeof of the type...
self.failUnlessEqual(sizeof(t), size)
# and sizeof of an instance
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment