Blame 00135-fix-test-within-test_weakref-in-debug-build.patch

e32ce18
diff -up Python-3.2b2/Lib/test/test_weakref.py.test-weakref-COUNT_ALLOCS_fix Python-3.2b2/Lib/test/test_weakref.py
e32ce18
--- Python-3.2b2/Lib/test/test_weakref.py.test-weakref-COUNT_ALLOCS_fix	2010-12-28 20:33:46.963364990 -0500
e32ce18
+++ Python-3.2b2/Lib/test/test_weakref.py	2010-12-28 20:35:44.115935248 -0500
e32ce18
@@ -583,9 +583,10 @@ class ReferencesTestCase(TestBase):
e32ce18
         # been cleared without their callbacks executing.  OTOH, the weakref
e32ce18
         # to C is bound to a function local (wr), and wasn't trash, so that
e32ce18
         # callback should have been invoked when C went away.
e32ce18
-        self.assertEqual(alist, ["C went away"])
e32ce18
-        # The remaining weakref should be dead now (its callback ran).
e32ce18
-        self.assertEqual(wr(), None)
e32ce18
+        if not hasattr(sys, 'getcounts'):
e32ce18
+            self.assertEqual(alist, ["C went away"])
e32ce18
+            # The remaining weakref should be dead now (its callback ran).
e32ce18
+            self.assertEqual(wr(), None)
e32ce18
 
e32ce18
         del alist[:]
e32ce18
         gc.collect()