]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - python3/patches/00141-fix-test_gc_with_COUNT_ALLOCS.patch
grep: Update to 2.17.
[people/ms/ipfire-3.x.git] / python3 / patches / 00141-fix-test_gc_with_COUNT_ALLOCS.patch
1 diff -up Python-3.2b2/Lib/test/test_gc.py.fix-test-gc-COUNT_ALLOCS Python-3.2b2/Lib/test/test_gc.py
2 --- Python-3.2b2/Lib/test/test_gc.py.fix-test-gc-COUNT_ALLOCS 2010-12-28 20:39:40.779059772 -0500
3 +++ Python-3.2b2/Lib/test/test_gc.py 2010-12-28 20:41:15.890940017 -0500
4 @@ -102,10 +102,16 @@ class GCTests(unittest.TestCase):
5 del a
6 self.assertNotEqual(gc.collect(), 0)
7 del B, C
8 - self.assertNotEqual(gc.collect(), 0)
9 + if hasattr(sys, 'getcounts'):
10 + self.assertEqual(gc.collect(), 0)
11 + else:
12 + self.assertNotEqual(gc.collect(), 0)
13 A.a = A()
14 del A
15 - self.assertNotEqual(gc.collect(), 0)
16 + if hasattr(sys, 'getcounts'):
17 + self.assertEqual(gc.collect(), 0)
18 + else:
19 + self.assertNotEqual(gc.collect(), 0)
20 self.assertEqual(gc.collect(), 0)
21
22 def test_method(self):