[pypy-commit] cffi default: Add some checks that will fail in PyPy
arigo
noreply at buildbot.pypy.org
Tue Jun 9 20:41:38 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r2181:1ba1aa9565ff
Date: 2015-06-09 20:41 +0200
http://bitbucket.org/cffi/cffi/changeset/1ba1aa9565ff/
Log: Add some checks that will fail in PyPy
diff --git a/testing/cffi1/test_recompiler.py b/testing/cffi1/test_recompiler.py
--- a/testing/cffi1/test_recompiler.py
+++ b/testing/cffi1/test_recompiler.py
@@ -409,6 +409,10 @@
# 'x' is another <built-in method> object on lib, made very indirectly
x = type(lib).__dir__.__get__(lib)
py.test.raises(TypeError, ffi.typeof, x)
+ #
+ assert hasattr(lib.sin, '__name__') # present on built-in functions on
+ assert hasattr(lib.sin, '__module__') # CPython; must be emulated on PyPy
+ assert hasattr(lib.sin, '__doc__')
def test_verify_anonymous_struct_with_typedef():
ffi = FFI()
More information about the pypy-commit
mailing list