[Python-checkins] cpython (2.7): 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/ab97ff838e11
changeset: 99635:ab97ff838e11
branch: 2.7
parent: 99633:be3998aed1e7
user: Serhiy Storchaka <storchaka at gmail.com>
date: Sat Dec 19 22:49:29 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
@@ -760,7 +760,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('3P') # 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