Commits

Amaury Forgeot d'Arc committed 84b1f2d

Fix cpyext.test_getargs. Actually a simplification.

Comments (0)

Files changed (1)

pypy/module/cpyext/test/test_getargs.py

 from pypy.module.cpyext.test.test_cpyext import AppTestCpythonExtensionBase
 
 class AppTestGetargs(AppTestCpythonExtensionBase):
-    def setup_method(self, func):
-        super(AppTestGetargs, self).setup_method(func)
-        self.w_import_parser = self.space.wrap(self.import_parser)
-
-
-    def import_parser(self, implementation, argstyle='METH_VARARGS'):
+    def w_import_parser(self, implementation, argstyle='METH_VARARGS'):
         mod = self.import_extension(
             'modname', [('funcname', argstyle, implementation)])
-        return self.space.getattr(mod, self.space.wrap("funcname"))
-
+        return mod.funcname
 
     def test_pyarg_parse_int(self):
         """