[pypy-commit] pypy default: Remove stray duplicate tests

Greg Price noreply at buildbot.pypy.org
Tue Mar 26 06:15:45 CET 2013


Author: Greg Price <price at mit.edu>
Branch: 
Changeset: r62798:da9b9ff8e69b
Date: 2013-03-25 22:14 -0700
http://bitbucket.org/pypy/pypy/changeset/da9b9ff8e69b/

Log:	Remove stray duplicate tests

diff --git a/rpython/memory/test/gc_test_base.py b/rpython/memory/test/gc_test_base.py
--- a/rpython/memory/test/gc_test_base.py
+++ b/rpython/memory/test/gc_test_base.py
@@ -801,145 +801,3 @@
     __slots__ = 'smallint'
     def meth(self, x):
         return self.smallint + x + 3
-
-
-class TestSemiSpaceGC(GCTest, snippet.SemiSpaceGCTests):
-    from rpython.memory.gc.semispace import SemiSpaceGC as GCClass
-    GC_CAN_MOVE = True
-    GC_CAN_MALLOC_NONMOVABLE = False
-    GC_CAN_SHRINK_ARRAY = True
-    GC_CAN_SHRINK_BIG_ARRAY = True
-
-class TestGrowingSemiSpaceGC(TestSemiSpaceGC):
-    GC_PARAMS = {'space_size': 16*WORD}
-
-class TestGenerationalGC(TestSemiSpaceGC):
-    from rpython.memory.gc.generation import GenerationGC as GCClass
-
-class TestHybridGC(TestGenerationalGC):
-    from rpython.memory.gc.hybrid import HybridGC as GCClass
-    GC_CAN_MALLOC_NONMOVABLE = True
-    GC_CAN_SHRINK_BIG_ARRAY = False
-
-    def test_ref_from_rawmalloced_to_regular(self):
-        import gc
-        def concat(j):
-            lst = []
-            for i in range(j):
-                lst.append(str(i))
-            gc.collect()
-            return len("".join(lst))
-        res = self.interpret(concat, [100])
-        assert res == concat(100)
-
-    def test_longliving_weakref(self):
-        # test for the case where a weakref points to a very old object
-        # that was made non-movable after several collections
-        import gc, weakref
-        class A:
-            pass
-        def step1(x):
-            a = A()
-            a.x = 42
-            ref = weakref.ref(a)
-            i = 0
-            while i < x:
-                gc.collect()
-                i += 1
-            assert ref() is a
-            assert ref().x == 42
-            return ref
-        def step2(ref):
-            gc.collect()       # 'a' is freed here
-            assert ref() is None
-        def f(x):
-            ref = step1(x)
-            step2(ref)
-        self.interpret(f, [10])
-
-    def test_longliving_object_with_finalizer(self):
-        class B(object):
-            pass
-        b = B()
-        b.nextid = 0
-        b.num_deleted = 0
-        class A(object):
-            def __init__(self):
-                self.id = b.nextid
-                b.nextid += 1
-            def __del__(self):
-                b.num_deleted += 1
-        def f(x):
-            a = A()
-            i = 0
-            while i < x:
-                i += 1
-                a = A()
-                llop.gc__collect(lltype.Void)
-            llop.gc__collect(lltype.Void)
-            llop.gc__collect(lltype.Void)
-            return b.num_deleted
-        res = self.interpret(f, [15])
-        assert res == 16
-
-    def test_malloc_nonmovable_fixsize(self):
-        py.test.skip("Not supported")
-
-class TestHybridGCSmallHeap(GCTest):
-    from rpython.memory.gc.hybrid import HybridGC as GCClass
-    GC_CAN_MOVE = False # with this size of heap, stuff gets allocated
-                        # in 3rd gen.
-    GC_CAN_MALLOC_NONMOVABLE = True
-    GC_PARAMS = {'space_size': 48*WORD,
-                 'min_nursery_size': 12*WORD,
-                 'nursery_size': 12*WORD,
-                 'large_object': 3*WORD,
-                 'large_object_gcptrs': 3*WORD,
-                 'generation3_collect_threshold': 5,
-                 }
-
-    def test_gen3_to_gen2_refs(self):
-        class A(object):
-            def __init__(self):
-                self.x1 = -1
-        def f(x):
-            loop = A()
-            loop.next = loop
-            loop.prev = loop
-            i = 0
-            while i < x:
-                i += 1
-                a1 = A()
-                a1.x1 = i
-                a2 = A()
-                a2.x1 = i + 1000
-                a1.prev = loop.prev
-                a1.prev.next = a1
-                a1.next = loop
-                loop.prev = a1
-                a2.prev = loop
-                a2.next = loop.next
-                a2.next.prev = a2
-                loop.next = a2
-            i = 0
-            a = loop
-            while True:
-                a = a.next
-                i += 1
-                if a is loop:
-                    return i
-        res = self.interpret(f, [200])
-        assert res == 401
-
-    def test_malloc_nonmovable_fixsize(self):
-        py.test.skip("Not supported")
-
-
-class TestMiniMarkGC(TestSemiSpaceGC):
-    from rpython.memory.gc.minimark import MiniMarkGC as GCClass
-    GC_CAN_SHRINK_BIG_ARRAY = False
-    GC_CAN_MALLOC_NONMOVABLE = True
-    BUT_HOW_BIG_IS_A_BIG_STRING = 11*WORD
-
-class TestMiniMarkGCCardMarking(TestMiniMarkGC):
-    GC_PARAMS = {'card_page_indices': 4}


More information about the pypy-commit mailing list