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

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