Author: Brian Kearns <bdkea...@gmail.com> Branch: Changeset: r62201:7d5c829d6e47 Date: 2013-03-07 20:18 -0500 http://bitbucket.org/pypy/pypy/changeset/7d5c829d6e47/
Log: merge heads 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 pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit