[Python-checkins] cpython (merge 3.5 -> default): Use correct PyGC_Head size in tests for issue #25421.
serhiy.storchaka
python-checkins at python.org
Sat Dec 19 15:51:24 EST 2015
https://hg.python.org/cpython/rev/5115f39cc59f
changeset: 99636:5115f39cc59f
parent: 99632:4a47e998c40a
parent: 99634:a1388dbdd293
user: Serhiy Storchaka <storchaka at gmail.com>
date: Sat Dec 19 22:51:00 2015 +0200
summary:
Use correct PyGC_Head size in tests for issue #25421.
files:
Lib/test/test_sys.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -1115,7 +1115,7 @@
def check_slots(self, obj, base, extra):
expected = sys.getsizeof(base) + struct.calcsize(extra)
if gc.is_tracked(obj) and not gc.is_tracked(base):
- expected += struct.calcsize('2Pn') # PyGC_Head
+ expected += self.gc_headsize
self.assertEqual(sys.getsizeof(obj), expected)
def test_slots(self):
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list