Make this test work with older Python releases where struct has no 't' format character.
This commit is contained in:
parent
b53940f238
commit
1b9e041812
|
@ -117,7 +117,10 @@ class NumberTestCase(unittest.TestCase):
|
|||
|
||||
def test_sizes(self):
|
||||
for t in signed_types + unsigned_types + float_types + bool_types:
|
||||
try:
|
||||
size = struct.calcsize(t._type_)
|
||||
except struct.error:
|
||||
continue
|
||||
# sizeof of the type...
|
||||
self.failUnlessEqual(sizeof(t), size)
|
||||
# and sizeof of an instance
|
||||
|
|
Loading…
Reference in New Issue