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: v2.7.12rc1~330 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e789038e0d2740e226aa34ec36428bdab241fc71;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 e6c17a2d35f7..4afb78059938 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -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):