[pypy-svn] r57137 - pypy/branch/garden-call-code/pypy/interpreter/test

pedronis at codespeak.net pedronis at codespeak.net
Sat Aug 9 16:51:28 CEST 2008


Author: pedronis
Date: Sat Aug  9 16:51:28 2008
New Revision: 57137

Modified:
   pypy/branch/garden-call-code/pypy/interpreter/test/test_gateway.py
Log:
another bit of reorg



Modified: pypy/branch/garden-call-code/pypy/interpreter/test/test_gateway.py
==============================================================================
--- pypy/branch/garden-call-code/pypy/interpreter/test/test_gateway.py	(original)
+++ pypy/branch/garden-call-code/pypy/interpreter/test/test_gateway.py	Sat Aug  9 16:51:28 2008
@@ -491,7 +491,7 @@
 
 class TestPassThroughArguments:
     
-    def test_pass_trough_arguments(self):
+    def test_pass_trough_arguments0(self):
         space = self.space
 
         called = []
@@ -501,20 +501,10 @@
             a_w, _ = __args__.unpack()
             return space.newtuple([space.wrap('f')]+a_w)
 
-        def g(space, w_self, __args__):
-            called.append(__args__)
-            a_w, _ = __args__.unpack()
-            return space.newtuple([space.wrap('g'), w_self, ]+a_w)
-
         w_f = space.wrap(gateway.interp2app_temp(f,
                          unwrap_spec=[gateway.ObjSpace,
                                       gateway.Arguments]))
 
-        w_g = space.wrap(gateway.interp2app_temp(g,
-                         unwrap_spec=[gateway.ObjSpace,
-                                      gateway.W_Root,
-                                      gateway.Arguments]))
-
         args = argument.Arguments(space, [space.wrap(7)])
 
         w_res = space.call_args(w_f, args)
@@ -522,7 +512,21 @@
         
         # white-box check for opt
         assert called[0] is args
+
+    def test_pass_trough_arguments1(self):
+        space = self.space
+
         called = []
+        
+        def g(space, w_self, __args__):
+            called.append(__args__)
+            a_w, _ = __args__.unpack()
+            return space.newtuple([space.wrap('g'), w_self, ]+a_w)
+
+        w_g = space.wrap(gateway.interp2app_temp(g,
+                         unwrap_spec=[gateway.ObjSpace,
+                                      gateway.W_Root,
+                                      gateway.Arguments]))
 
         w_self = space.wrap('self')
 



More information about the Pypy-commit mailing list