Use correct PyGC_Head size in tests for issue #25421.
This commit is contained in:
parent
c06a6d0958
commit
e789038e0d
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue