Blame SOURCES/python-2.7.1-fix_test_abc_with_COUNT_ALLOCS.patch

6e8c2f
diff -up Python-2.7.1/Lib/test/test_abc.py.cache_leak Python-2.7.1/Lib/test/test_abc.py
6e8c2f
--- Python-2.7.1/Lib/test/test_abc.py.cache_leak	2010-12-28 18:06:35.551938356 -0500
6e8c2f
+++ Python-2.7.1/Lib/test/test_abc.py	2010-12-28 18:09:09.021059202 -0500
6e8c2f
@@ -3,6 +3,8 @@
6e8c2f
 
6e8c2f
 """Unit tests for abc.py."""
6e8c2f
 
6e8c2f
+import sys
6e8c2f
+
6e8c2f
 import unittest, weakref
6e8c2f
 from test import test_support
6e8c2f
 
6e8c2f
@@ -229,8 +231,12 @@ class TestABC(unittest.TestCase):
6e8c2f
         # Trigger cache.
6e8c2f
         C().f()
6e8c2f
         del C
6e8c2f
-        test_support.gc_collect()
6e8c2f
-        self.assertEqual(r(), None)
6e8c2f
+        # This doesn't work in our debug build, presumably due to its use
6e8c2f
+        # of COUNT_ALLOCS, which makes heap-allocated types immortal (once
6e8c2f
+        # they've ever had an instance):
6e8c2f
+        if not hasattr(sys, 'getcounts'):
6e8c2f
+            test_support.gc_collect()
6e8c2f
+            self.assertEqual(r(), None)
6e8c2f
 
6e8c2f
 def test_main():
6e8c2f
     test_support.run_unittest(TestABC)