Blame SOURCES/python-2.7.1-fix_test_abc_with_COUNT_ALLOCS.patch

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