From 1b9e041812293fc37d13b42010e3a714dc4e5a14 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 8 Jun 2007 16:10:27 +0000 Subject: Make this test work with older Python releases where struct has no 't' format character. --- Lib/ctypes/test/test_numbers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/ctypes/test/test_numbers.py b/Lib/ctypes/test/test_numbers.py index ead3605..ff2da86 100644 --- a/Lib/ctypes/test/test_numbers.py +++ b/Lib/ctypes/test/test_numbers.py @@ -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 -- cgit v0.12