Blame SOURCES/python-2.7.1-fix_test_abc_with_COUNT_ALLOCS.patch

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