Commits

Antonio Cuni committed ca9f485

fix this test

Comments (0)

Files changed (2)

lib_pypy/_ctypes/function.py

                     "This function takes %d argument%s (%s given)"
                     % (len(self._argtypes_), plural, len(args)))
 
-            newargs = self._convert_args_for_callback(argtypes, args)
+            try:
+                newargs = self._convert_args_for_callback(argtypes, args)
+            except (UnicodeError, TypeError, ValueError), e:
+                raise ArgumentError(str(e))
             try:
                 res = self.callable(*newargs)
             except:

pypy/module/test_lib_pypy/ctypes_tests/test_callbacks.py

         assert cfunc(param) is param
 
     def test_raise_argumenterror(self):
-        py.test.skip('FIXME')
         def callback(x):
             pass
         FUNC = CFUNCTYPE(None, c_void_p)