Author: Ronan Lamy <ronan.l...@gmail.com> Branch: Changeset: r76750:686fc31b6e07 Date: 2015-04-08 18:40 +0100 http://bitbucket.org/pypy/pypy/changeset/686fc31b6e07/
Log: remove dead tests diff --git a/rpython/rtyper/lltypesystem/test/test_lltype.py b/rpython/rtyper/lltypesystem/test/test_lltype.py --- a/rpython/rtyper/lltypesystem/test/test_lltype.py +++ b/rpython/rtyper/lltypesystem/test/test_lltype.py @@ -210,33 +210,6 @@ assert p1b == cast_pointer(Ptr(S1bis), p3) py.test.raises(RuntimeError, "cast_pointer(Ptr(S1), p3)") -def test_best_effort_gced_parent_detection(): - py.test.skip("test not relevant any more") - S2 = Struct("s2", ('a', Signed)) - S1 = GcStruct("s1", ('sub1', S2), ('sub2', S2), ('tail', Array(('e', Signed)))) - p1 = malloc(S1, 1) - p2 = p1.sub2 - p3 = p1.tail - p3[0].e = 1 - assert p3[0].e == 1 - del p1 - import gc - gc.collect() - py.test.raises(RuntimeError, "p2.a") - py.test.raises(RuntimeError, "p3[0]") - -def test_best_effort_gced_parent_for_arrays(): - py.test.skip("test not relevant any more") - A1 = GcArray(('v', Signed)) - p1 = malloc(A1, 10) - p1[5].v=3 - assert p1[5].v == 3 - p1_5 = p1[5] - del p1 - import gc - gc.collect() - py.test.raises(RuntimeError, "p1_5.v") - def test_examples(): A1 = GcArray(('v', Signed)) S = GcStruct("s", ('v', Signed)) @@ -388,11 +361,11 @@ s.x = 1 def type_info_S(p): return getRuntimeTypeInfo(S) - qp = functionptr(FuncType([Ptr(S)], Ptr(RuntimeTypeInfo)), - "type_info_S", + qp = functionptr(FuncType([Ptr(S)], Ptr(RuntimeTypeInfo)), + "type_info_S", _callable=type_info_S) - dp = functionptr(FuncType([Ptr(S)], Void), - "destructor_funcptr", + dp = functionptr(FuncType([Ptr(S)], Void), + "destructor_funcptr", _callable=f) pinf0 = attachRuntimeTypeInfo(S, qp, destrptr=dp) assert pinf0._obj.about == S @@ -422,8 +395,8 @@ return getRuntimeTypeInfo(S) else: return getRuntimeTypeInfo(S1) - fp = functionptr(FuncType([Ptr(S)], Ptr(RuntimeTypeInfo)), - "dynamic_type_info_S", + fp = functionptr(FuncType([Ptr(S)], Ptr(RuntimeTypeInfo)), + "dynamic_type_info_S", _callable=dynamic_type_info_S) attachRuntimeTypeInfo(S, fp) assert s.x == 0 @@ -434,7 +407,7 @@ py.test.raises(RuntimeError, "runtime_type_info(s1.sub)") s1.sub.x = 1 assert runtime_type_info(s1.sub) == getRuntimeTypeInfo(S1) - + def test_flavor_malloc(): def isweak(p, T): return p._weak and typeOf(p).TO == T @@ -450,7 +423,7 @@ p = malloc(T, flavor="gc") assert typeOf(p).TO == T assert not isweak(p, T) - + def test_opaque(): O = OpaqueType('O') p1 = opaqueptr(O, 'p1', hello="world") @@ -520,8 +493,8 @@ def test_adtmeths(): def h_newstruct(): return malloc(S) - - S = GcStruct('s', ('x', Signed), + + S = GcStruct('s', ('x', Signed), adtmeths={"h_newstruct": h_newstruct}) s = S.h_newstruct() @@ -553,15 +526,15 @@ def h_newstruct(S): return malloc(S) h_newstruct = typeMethod(h_newstruct) - - S = GcStruct('s', ('x', Signed), + + S = GcStruct('s', ('x', Signed), adtmeths={"h_newstruct": h_newstruct}) s = S.h_newstruct() assert typeOf(s) == Ptr(S) - Sprime = GcStruct('s', ('x', Signed), + Sprime = GcStruct('s', ('x', Signed), adtmeths={"h_newstruct": h_newstruct}) assert S == Sprime @@ -592,7 +565,7 @@ PA = Ptr(A) a = malloc(A, 2) assert cast_pointer(PA, a) == a - + def test_array_with_no_length(): A = GcArray(Signed, hints={'nolength': True}) a = malloc(A, 10) @@ -604,7 +577,7 @@ s = malloc(GcS) s.x = 1 assert list(dissect_ll_instance(s)) == [(Ptr(GcS), s), (GcS, s._obj), (Signed, 1)] - + A = GcArray(('x', Signed)) a = malloc(A, 10) for i in range(10): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit