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