Use correct PyGC_Head size in tests for issue #25421.

This commit is contained in:
Serhiy Storchaka 2015-12-19 22:49:29 +02:00
parent c06a6d0958
commit e789038e0d
1 changed files with 1 additions and 1 deletions

View File

@ -760,7 +760,7 @@ class SizeofTest(unittest.TestCase):
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):