]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use correct PyGC_Head size in tests for issue #25421.
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 19 Dec 2015 20:49:29 +0000 (22:49 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Sat, 19 Dec 2015 20:49:29 +0000 (22:49 +0200)
Lib/test/test_sys.py

index 4f1577d65d85e3faf730a3509b32c11d7be16c30..5a37537acdf82cf344ce96aab805a4b3049f22f9 100644 (file)
@@ -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):