Author: Antonio Cuni <[email protected]>
Branch:
Changeset: r46011:ca9f485900d4
Date: 2011-07-27 12:15 +0200
http://bitbucket.org/pypy/pypy/changeset/ca9f485900d4/
Log: fix this test
diff --git a/lib_pypy/_ctypes/function.py b/lib_pypy/_ctypes/function.py
--- a/lib_pypy/_ctypes/function.py
+++ b/lib_pypy/_ctypes/function.py
@@ -296,7 +296,10 @@
"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:
diff --git a/pypy/module/test_lib_pypy/ctypes_tests/test_callbacks.py
b/pypy/module/test_lib_pypy/ctypes_tests/test_callbacks.py
--- a/pypy/module/test_lib_pypy/ctypes_tests/test_callbacks.py
+++ b/pypy/module/test_lib_pypy/ctypes_tests/test_callbacks.py
@@ -246,7 +246,6 @@
assert cfunc(param) is param
def test_raise_argumenterror(self):
- py.test.skip('FIXME')
def callback(x):
pass
FUNC = CFUNCTYPE(None, c_void_p)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit