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