From: Serhiy Storchaka Date: Sat, 19 Dec 2015 20:49:29 +0000 (+0200) Subject: Use correct PyGC_Head size in tests for issue #25421. X-Git-Tag: v3.6.0a1~882^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9c297e43bf5cdf939ee165a2e177794dc352fa17;p=thirdparty%2FPython%2Fcpython.git Use correct PyGC_Head size in tests for issue #25421. --- diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 4f1577d65d85..5a37537acdf8 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -1115,7 +1115,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('2Pn') # PyGC_Head + expected += self.gc_headsize self.assertEqual(sys.getsizeof(obj), expected) def test_slots(self):