[pypy-commit] cffi default: extra tests
arigo
pypy.commits at gmail.com
Tue Jan 24 18:53:31 EST 2017
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r2874:ece6f0f2da93
Date: 2017-01-25 00:44 +0100
http://bitbucket.org/cffi/cffi/changeset/ece6f0f2da93/
Log: extra tests
diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -784,6 +784,11 @@
assert str(e.value) == "cdata 'int *' has no attribute 'foobar'"
e = py.test.raises(AttributeError, "j.foobar = 42")
assert str(e.value) == "cdata 'int *' has no attribute 'foobar'"
+ pp = newp(new_pointer_type(BStructPtr), p)
+ e = py.test.raises(AttributeError, "pp.a1")
+ assert str(e.value) == "cdata 'struct foo * *' has no attribute 'a1'"
+ e = py.test.raises(AttributeError, "pp.a1 = 42")
+ assert str(e.value) == "cdata 'struct foo * *' has no attribute 'a1'"
def test_union_instance():
BInt = new_primitive_type("int")
More information about the pypy-commit
mailing list