Author: Armin Rigo <[email protected]>
Branch:
Changeset: r2182:713b2badd33b
Date: 2015-06-09 20:47 +0200
http://bitbucket.org/cffi/cffi/changeset/713b2badd33b/
Log: Make the test more precise
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
@@ -410,9 +410,10 @@
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__')
+ # present on built-in functions on CPython; must be emulated on PyPy:
+ assert lib.sin.__name__ == 'sin'
+ assert lib.sin.__module__ == '_CFFI_test_math_sin_type'
+ assert lib.sin.__doc__ == 'direct call to the C function of the same name'
def test_verify_anonymous_struct_with_typedef():
ffi = FFI()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit