Author: Armin Rigo <[email protected]>
Branch:
Changeset: r62197:0d391c72accf
Date: 2013-03-08 00:54 +0100
http://bitbucket.org/pypy/pypy/changeset/0d391c72accf/
Log: Update to cffi/7a86941ef198
diff --git a/pypy/module/_cffi_backend/test/_backend_test_c.py
b/pypy/module/_cffi_backend/test/_backend_test_c.py
--- a/pypy/module/_cffi_backend/test/_backend_test_c.py
+++ b/pypy/module/_cffi_backend/test/_backend_test_c.py
@@ -2644,6 +2644,17 @@
c[1:3] = d
assert list(c) == [0, 40, 50, 30, 0]
+def test_FILE_forbidden():
+ BFILE = new_struct_type("_IO_FILE")
+ BFILEP = new_pointer_type(BFILE)
+ BFunc = new_function_type((BFILEP,), BFILEP, False)
+ func = cast(BFunc, 0)
+ with open(__file__, "rb") as f:
+ e = py.test.raises(TypeError, func, f)
+ if '__pypy__' not in sys.builtin_module_names:
+ assert ('note that you cannot pass Python files directly '
+ 'any more since CFFI 0.6') in str(e.value)
+
def test_version():
# this test is here mostly for PyPy
assert __version__ == "0.6"
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit