[pypy-svn] r10183 - pypy/dist/pypy/interpreter/test

tismer at codespeak.net tismer at codespeak.net
Wed Mar 30 19:37:20 CEST 2005


Author: tismer
Date: Wed Mar 30 19:37:19 2005
New Revision: 10183

Modified:
   pypy/dist/pypy/interpreter/test/test_appinterp.py
Log:
duplicated some applevel tests for applevelinterp

Modified: pypy/dist/pypy/interpreter/test/test_appinterp.py
==============================================================================
--- pypy/dist/pypy/interpreter/test/test_appinterp.py	(original)
+++ pypy/dist/pypy/interpreter/test/test_appinterp.py	Wed Mar 30 19:37:19 2005
@@ -1,6 +1,6 @@
 
 import py
-from pypy.interpreter.gateway import appdef, applevel
+from pypy.interpreter.gateway import appdef, applevel, applevelinterp
 
 def test_execwith_novars(space): 
     val = space.appexec([], """ 
@@ -70,7 +70,7 @@
     w_result = app(space) 
     assert space.eq_w(w_result, space.wrap(42))
 
-def test_applevel_functions(space):
+def test_applevel_functions(space, applevel=applevel):
     app = applevel('''
         def f(x, y):
             return x-y
@@ -81,7 +81,10 @@
     w_res = g(space, space.wrap(10), space.wrap(1))
     assert space.eq_w(w_res, space.wrap(-9))
 
-def test_applevel_class(space):
+def test_applevelinterp_functions(space):
+    test_applevel_functions(space, applevel=applevelinterp)
+
+def test_applevel_class(space, applevel=applevel):
     app = applevel('''
         class C: 
             clsattr = 42 
@@ -95,6 +98,9 @@
     w_clsattr = space.getattr(c, space.wrap('attr'))
     assert space.eq_w(w_clsattr, space.wrap(17))
 
+def test_applevelinterp_class(space):
+    test_applevel_class(space, applevel=applevelinterp)
+
 def app_test_something_at_app_level(): 
     x = 2
     assert x/2 == 1



More information about the Pypy-commit mailing list