866e929265
* Sat Sep 10 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-10 - rewrite of "check", introducing downstream-only hooks for skipping specific cases in an rpmbuild (patch 132), and fixing/skipping failing tests in a more fine-grained manner than before (patches 104, 133-142)
25 lines
1.0 KiB
Diff
25 lines
1.0 KiB
Diff
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
|
|
--- Python-2.7.2/Lib/test/test_gc.py.fix-test_gc_with_COUNT_ALLOCS 2011-09-08 19:49:13.045924309 -0400
|
|
+++ Python-2.7.2/Lib/test/test_gc.py 2011-09-08 19:50:07.035920617 -0400
|
|
@@ -102,11 +102,17 @@ class GCTests(unittest.TestCase):
|
|
del a
|
|
self.assertNotEqual(gc.collect(), 0)
|
|
del B, C
|
|
- self.assertNotEqual(gc.collect(), 0)
|
|
+ if hasattr(sys, 'getcounts'):
|
|
+ self.assertEqual(gc.collect(), 0)
|
|
+ else:
|
|
+ self.assertNotEqual(gc.collect(), 0)
|
|
A.a = A()
|
|
del A
|
|
- self.assertNotEqual(gc.collect(), 0)
|
|
- self.assertEqual(gc.collect(), 0)
|
|
+ if hasattr(sys, 'getcounts'):
|
|
+ self.assertEqual(gc.collect(), 0)
|
|
+ else:
|
|
+ self.assertNotEqual(gc.collect(), 0)
|
|
+ self.assertEqual(gc.collect(), 0)
|
|
|
|
def test_method(self):
|
|
# Tricky: self.__init__ is a bound method, it references the instance.
|