[pypy-commit] pypy default: import the cffi tests
arigo
noreply at buildbot.pypy.org
Sun Jun 21 12:38:04 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r78227:67324d866b32
Date: 2015-06-21 12:38 +0200
http://bitbucket.org/pypy/pypy/changeset/67324d866b32/
Log: import the cffi tests
diff --git a/pypy/module/test_lib_pypy/cffi_tests/cffi1/test_recompiler.py b/pypy/module/test_lib_pypy/cffi_tests/cffi1/test_recompiler.py
--- a/pypy/module/test_lib_pypy/cffi_tests/cffi1/test_recompiler.py
+++ b/pypy/module/test_lib_pypy/cffi_tests/cffi1/test_recompiler.py
@@ -266,6 +266,15 @@
""")
lib.aa = 5
assert dir(lib) == ['aa', 'ff', 'my_constant']
+ #
+ aaobj = lib.__dict__['aa']
+ assert not isinstance(aaobj, int) # some internal object instead
+ assert lib.__dict__ == {
+ 'ff': lib.ff,
+ 'aa': aaobj,
+ 'my_constant': -45}
+ lib.__dict__['ff'] = "??"
+ assert lib.ff(10) == 15
def test_verify_opaque_struct():
ffi = FFI()
@@ -1053,5 +1062,5 @@
assert sys.modules['_CFFI_test_import_from_lib.lib'] is lib
from _CFFI_test_import_from_lib.lib import MYFOO
assert MYFOO == 42
- assert not hasattr(lib, '__dict__')
+ assert hasattr(lib, '__dict__')
assert lib.__all__ == ['MYFOO', 'mybar'] # but not 'myvar'
More information about the pypy-commit
mailing list