[pypy-commit] cffi cffi-1.0: fix test

arigo noreply at buildbot.pypy.org
Sat Apr 25 11:15:48 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: cffi-1.0
Changeset: r1811:d3fe2c3910db
Date: 2015-04-25 11:07 +0200
http://bitbucket.org/cffi/cffi/changeset/d3fe2c3910db/

Log:	fix test

diff --git a/_cffi1/test_verify1.py b/_cffi1/test_verify1.py
--- a/_cffi1/test_verify1.py
+++ b/_cffi1/test_verify1.py
@@ -1027,7 +1027,7 @@
     ffi = FFI()
     ffi.cdef("struct foo_s { long a; ...; };\n"
              "int (*foo)(struct foo_s);")
-    e = py.test.raises(TypeError, ffi.verify, """
+    lib = ffi.verify("""
         struct foo_s {
             double b;
             long a;
@@ -1037,6 +1037,7 @@
         }
         int (*foo)(struct foo_s s) = &foo1;
     """)
+    e = py.test.raises(TypeError, "lib.foo")    # lazily
     msg ='cannot pass as an argument a struct that was completed with verify()'
     assert msg in str(e.value)
 


More information about the pypy-commit mailing list