[pypy-svn] r47136 - in pypy/dist/pypy: rpython/rctypes/test translator/llvm/test

rxe at codespeak.net rxe at codespeak.net
Wed Oct 3 22:55:47 CEST 2007


Author: rxe
Date: Wed Oct  3 22:55:47 2007
New Revision: 47136

Modified:
   pypy/dist/pypy/rpython/rctypes/test/test_rarray.py
   pypy/dist/pypy/rpython/rctypes/test/test_rprimitive.py
   pypy/dist/pypy/translator/llvm/test/test_lltype.py
Log:
fwiw, kill any llvm tests that reference rctypes (they never worked and they never will)

Modified: pypy/dist/pypy/rpython/rctypes/test/test_rarray.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_rarray.py	(original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_rarray.py	Wed Oct  3 22:55:47 2007
@@ -16,9 +16,6 @@
 
 c_int_10 = ARRAY(c_int,10)
 
-test_c_compile = True
-test_llvm_compile = False
-
 def maketest():
     A1 = c_int * 10
     A2 = POINTER(c_int) * 10
@@ -346,9 +343,6 @@
 
 class Test_compilation:
     def setup_class(self):
-        if not test_c_compile:
-            py.test.skip("c compilation disabled")
-
         from pypy.translator.c.test.test_genc import compile
         self.compile = lambda s, x, y : compile(x, y)
 
@@ -408,10 +402,3 @@
         fn = self.compile(func, [int])
         res = fn(N)
         assert res == 12345678
-
-class Test_compilation_llvm(Test_compilation):
-    def setup_class(self):
-        if not test_llvm_compile:
-            py.test.skip("llvm tests disabled")
-        from pypy.translator.llvm.test.runtest import compile_function
-        self.compile = lambda s, x, y : compile_function(x, y)

Modified: pypy/dist/pypy/rpython/rctypes/test/test_rprimitive.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_rprimitive.py	(original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_rprimitive.py	Wed Oct  3 22:55:47 2007
@@ -17,9 +17,6 @@
 from ctypes import c_double, c_wchar, c_char_p, pointer, sizeof
 from ctypes import Structure
 
-test_c_compile = True
-test_llvm_compile = False
-
 class Test_annotation:
     def test_simple(self):
         res = c_int(42)
@@ -469,9 +466,6 @@
         
 class Test_compilation:
     def setup_class(self):
-        if not test_c_compile:
-            py.test.skip("c compilation disabled")
-
         from pypy.translator.c.test.test_genc import compile
         self.compile = lambda s, x, y : compile(x, y)
 
@@ -615,9 +609,3 @@
         fn = self.compile(func, [int])
         assert fn(19) == func(19)
 
-class Test_compilation_llvm(Test_compilation):
-    def setup_class(self):
-        if not test_llvm_compile:
-            py.test.skip("llvm compilation disabled")
-        from pypy.translator.llvm.test.runtest import compile_function
-        self.compile = lambda s, x, y : compile_function(x, y)

Modified: pypy/dist/pypy/translator/llvm/test/test_lltype.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/test/test_lltype.py	(original)
+++ pypy/dist/pypy/translator/llvm/test/test_lltype.py	Wed Oct  3 22:55:47 2007
@@ -442,42 +442,3 @@
     fn = compile_function(llf, [])
     res = fn()
     assert res == 42
-
-def test_rctypes_array_access():
-    py.test.skip("this breaks during annotation - ?")
-    from ctypes import ARRAY, c_int
-    c_int_1 = ARRAY(c_int, 1)
-    
-    my_array = c_int_1()
-    
-    def llf():
-        my_array[0] = 42
-        return my_array[0]
-
-    fn = compile_function(llf, [])
-    res = fn()
-    assert res == 42
-
-def test_rctypes_char_array_value():
-    py.test.skip("this breaks during annotation - ?")
-    from ctypes import c_char
-    A = c_char * 3
-
-    def llf(n):
-        a = A()
-        a[n+0] = 'x'
-        a[n+1] = 'y'
-        return a.value == 'xy'
-
-    fn = compile_function(llf, [int])
-    res = fn(0)
-    assert res
-
-def test_rctypes_variants():
-    py.test.skip("wip")
-    from pypy.rpython.rctypes.test import test_rarray
-    llf, expected = test_rarray.maketest()
-
-    fn = compile_function(llf, [])
-    res = fn()
-    assert res == expected



More information about the Pypy-commit mailing list