[pypy-svn] pypy default: Fix using app-level helpers when running app level tests directly.

alex_gaynor commits-noreply at bitbucket.org
Wed Jan 19 06:18:36 CET 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r40919:f9cad972bc98
Date: 2011-01-18 23:18 -0600
http://bitbucket.org/pypy/pypy/changeset/f9cad972bc98/

Log:	Fix using app-level helpers when running app level tests directly.

diff --git a/pypy/conftest.py b/pypy/conftest.py
--- a/pypy/conftest.py
+++ b/pypy/conftest.py
@@ -128,7 +128,7 @@
 
         for name in ('int', 'long', 'str', 'unicode'):
             setattr(self, 'w_' + name, eval(name))
-        
+
 
     def appexec(self, args, body):
         body = body.lstrip()
@@ -429,10 +429,7 @@
         for name in dir(instance):
             if name.startswith('w_'):
                 if option.runappdirect:
-                    # if the value is a function living on the class,
-                    # don't turn it into a bound method here
-                    obj = getwithoutbinding(instance, name)
-                    setattr(instance, name[2:], obj)
+                    setattr(instance, name[2:], getattr(instance, name))
                 else:
                     obj = getattr(instance, name)
                     if isinstance(obj, types.MethodType):


More information about the Pypy-commit mailing list