[Python-checkins] r55828 - python/trunk/Lib/ctypes/test/test_numbers.py

thomas.heller python-checkins at python.org
Fri Jun 8 18:10:33 CEST 2007


Author: thomas.heller
Date: Fri Jun  8 18:10:27 2007
New Revision: 55828

Modified:
   python/trunk/Lib/ctypes/test/test_numbers.py
Log:
Make this test work with older Python releases where struct has no 't' format character.

Modified: python/trunk/Lib/ctypes/test/test_numbers.py
==============================================================================
--- python/trunk/Lib/ctypes/test/test_numbers.py	(original)
+++ python/trunk/Lib/ctypes/test/test_numbers.py	Fri Jun  8 18:10:27 2007
@@ -117,7 +117,10 @@
 
     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


More information about the Python-checkins mailing list