Blame SOURCES/python-2.7.1-fix_test_abc_with_COUNT_ALLOCS.patch

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