An interpreted, interactive, object-oriented programming language
CentOS Sources
2017-08-01 71084d584ff953f5463757ec6536406320560b4d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff -up Python-2.7.1/Lib/test/test_abc.py.cache_leak Python-2.7.1/Lib/test/test_abc.py
--- Python-2.7.1/Lib/test/test_abc.py.cache_leak    2010-12-28 18:06:35.551938356 -0500
+++ Python-2.7.1/Lib/test/test_abc.py    2010-12-28 18:09:09.021059202 -0500
@@ -3,6 +3,8 @@
 
 """Unit tests for abc.py."""
 
+import sys
+
 import unittest, weakref
 from test import test_support
 
@@ -229,8 +231,12 @@ class TestABC(unittest.TestCase):
         # Trigger cache.
         C().f()
         del C
-        test_support.gc_collect()
-        self.assertEqual(r(), None)
+        # This doesn't work in our debug build, presumably due to its use
+        # of COUNT_ALLOCS, which makes heap-allocated types immortal (once
+        # they've ever had an instance):
+        if not hasattr(sys, 'getcounts'):
+            test_support.gc_collect()
+            self.assertEqual(r(), None)
 
 def test_main():
     test_support.run_unittest(TestABC)