Blame 00141-fix-test_gc_with_COUNT_ALLOCS.patch
|
|
5080ffc |
diff -up Python-3.2b2/Lib/test/test_gc.py.fix-test-gc-COUNT_ALLOCS Python-3.2b2/Lib/test/test_gc.py
|
|
|
5080ffc |
--- Python-3.2b2/Lib/test/test_gc.py.fix-test-gc-COUNT_ALLOCS 2010-12-28 20:39:40.779059772 -0500
|
|
|
5080ffc |
+++ Python-3.2b2/Lib/test/test_gc.py 2010-12-28 20:41:15.890940017 -0500
|
|
|
5080ffc |
@@ -102,10 +102,16 @@ class GCTests(unittest.TestCase):
|
|
|
5080ffc |
del a
|
|
|
5080ffc |
self.assertNotEqual(gc.collect(), 0)
|
|
|
5080ffc |
del B, C
|
|
|
5080ffc |
- self.assertNotEqual(gc.collect(), 0)
|
|
|
5080ffc |
+ if hasattr(sys, 'getcounts'):
|
|
|
5080ffc |
+ self.assertEqual(gc.collect(), 0)
|
|
|
5080ffc |
+ else:
|
|
|
5080ffc |
+ self.assertNotEqual(gc.collect(), 0)
|
|
|
5080ffc |
A.a = A()
|
|
|
5080ffc |
del A
|
|
|
5080ffc |
- self.assertNotEqual(gc.collect(), 0)
|
|
|
5080ffc |
+ if hasattr(sys, 'getcounts'):
|
|
|
5080ffc |
+ self.assertEqual(gc.collect(), 0)
|
|
|
5080ffc |
+ else:
|
|
|
5080ffc |
+ self.assertNotEqual(gc.collect(), 0)
|
|
|
5080ffc |
self.assertEqual(gc.collect(), 0)
|
|
|
5080ffc |
|
|
|
5080ffc |
def test_method(self):
|