[Python-checkins] cpython (3.5): 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/a1388dbdd293
changeset:   99634:a1388dbdd293
branch:      3.5
parent:      99631:71d6755145ae
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
@@ -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