An interpreted, interactive, object-oriented programming language
CentOS Sources
2017-08-01 71084d584ff953f5463757ec6536406320560b4d
commit | author | age
6e8c2f 1 diff -up Python-2.7.1/Lib/test/test_abc.py.cache_leak Python-2.7.1/Lib/test/test_abc.py
CB 2 --- Python-2.7.1/Lib/test/test_abc.py.cache_leak    2010-12-28 18:06:35.551938356 -0500
3 +++ Python-2.7.1/Lib/test/test_abc.py    2010-12-28 18:09:09.021059202 -0500
4 @@ -3,6 +3,8 @@
5  
6  """Unit tests for abc.py."""
7  
8 +import sys
9 +
10  import unittest, weakref
11  from test import test_support
12  
13 @@ -229,8 +231,12 @@ class TestABC(unittest.TestCase):
14          # Trigger cache.
15          C().f()
16          del C
17 -        test_support.gc_collect()
18 -        self.assertEqual(r(), None)
19 +        # This doesn't work in our debug build, presumably due to its use
20 +        # of COUNT_ALLOCS, which makes heap-allocated types immortal (once
21 +        # they've ever had an instance):
22 +        if not hasattr(sys, 'getcounts'):
23 +            test_support.gc_collect()
24 +            self.assertEqual(r(), None)
25  
26  def test_main():
27      test_support.run_unittest(TestABC)