Blame 00134-fix-COUNT_ALLOCS-failure-in-test_sys.patch

fb26433
diff -up Python-3.3.0b2/Lib/test/test_sys.py.fix-COUNT_ALLOCS-failure-in-test_sys Python-3.3.0b2/Lib/test/test_sys.py
fb26433
--- Python-3.3.0b2/Lib/test/test_sys.py.fix-COUNT_ALLOCS-failure-in-test_sys	2012-08-11 02:54:16.000000000 -0400
fb26433
+++ Python-3.3.0b2/Lib/test/test_sys.py	2012-08-13 14:50:15.253720597 -0400
fb26433
@@ -835,12 +835,17 @@ class SizeofTest(unittest.TestCase):
fb26433
         # type
fb26433
         # static type: PyTypeObject
fb26433
         s = vsize('P2n15Pl4Pn9Pn11PI')
fb26433
+        # COUNT_ALLOCS adds a further 3 Py_ssize_t and 2 pointers:
fb26433
+        if hasattr(sys, 'getcounts'):
fb26433
+            s += struct.calcsize('3P2P')
fb26433
         check(int, s)
fb26433
         # (PyTypeObject + PyNumberMethods + PyMappingMethods +
fb26433
         #  PySequenceMethods + PyBufferProcs + 4P)
fb26433
         s = vsize('P2n15Pl4Pn9Pn11PI') + struct.calcsize('34P 3P 10P 2P 4P')
fb26433
         # Separate block for PyDictKeysObject with 4 entries
fb26433
         s += struct.calcsize("2nPn") + 4*struct.calcsize("n2P")
fb26433
+        if hasattr(sys, 'getcounts'):
fb26433
+            s += struct.calcsize('3P2P')
fb26433
         # class
fb26433
         class newstyleclass(object): pass
fb26433
         check(newstyleclass, s)