866e92
diff -up Python-2.7.2/Lib/test/test_gc.py.fix-test_gc_with_COUNT_ALLOCS Python-2.7.2/Lib/test/test_gc.py
866e92
--- Python-2.7.2/Lib/test/test_gc.py.fix-test_gc_with_COUNT_ALLOCS	2011-09-08 19:49:13.045924309 -0400
866e92
+++ Python-2.7.2/Lib/test/test_gc.py	2011-09-08 19:50:07.035920617 -0400
866e92
@@ -102,11 +102,17 @@ class GCTests(unittest.TestCase):
866e92
         del a
866e92
         self.assertNotEqual(gc.collect(), 0)
866e92
         del B, C
866e92
-        self.assertNotEqual(gc.collect(), 0)
866e92
+        if hasattr(sys, 'getcounts'):
866e92
+            self.assertEqual(gc.collect(), 0)
866e92
+        else:
866e92
+            self.assertNotEqual(gc.collect(), 0)
866e92
         A.a = A()
866e92
         del A
866e92
-        self.assertNotEqual(gc.collect(), 0)
866e92
-        self.assertEqual(gc.collect(), 0)
866e92
+        if hasattr(sys, 'getcounts'):
866e92
+            self.assertEqual(gc.collect(), 0)
866e92
+        else:
866e92
+            self.assertNotEqual(gc.collect(), 0)
866e92
+            self.assertEqual(gc.collect(), 0)
866e92
 
866e92
     def test_method(self):
866e92
         # Tricky: self.__init__ is a bound method, it references the instance.