[pypy-commit] pypy cpyext-ext: hack away again till tests run w/ -A

mattip pypy.commits at gmail.com
Thu Dec 17 15:13:06 EST 2015


Author: mattip <matti.picus at gmail.com>
Branch: cpyext-ext
Changeset: r81371:030855655208
Date: 2015-12-17 22:10 +0200
http://bitbucket.org/pypy/pypy/changeset/030855655208/

Log:	hack away again till tests run w/ -A

diff --git a/pypy/module/cpyext/test/test_cpyext.py b/pypy/module/cpyext/test/test_cpyext.py
--- a/pypy/module/cpyext/test/test_cpyext.py
+++ b/pypy/module/cpyext/test/test_cpyext.py
@@ -394,6 +394,10 @@
             def interp2app(func):
                 from distutils.sysconfig import get_python_inc
                 class FakeSpace(object):
+                    def passthrough(self, arg):
+                        return arg
+                    listview = passthrough
+                    str_w = passthrough
                     def unwrap(self, args):
                         try:
                             return args.str_w(None)
@@ -403,6 +407,10 @@
                 fake.include_dir = get_python_inc()
                 fake.config = self.space.config
                 def run(*args, **kwargs):
+                    for k in kwargs.keys():
+                        if k not in func.unwrap_spec and not k.startswith('w_'):
+                            v = kwargs.pop(k)
+                            kwargs['w_' + k] = v
                     return func(fake, *args, **kwargs)
                 return run
             def wrap(func):


More information about the pypy-commit mailing list