[pypy-commit] cffi default: Add a similar test for delattr, which already works.
arigo
noreply at buildbot.pypy.org
Sat Jul 14 19:02:21 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r645:a7084bcbadd8
Date: 2012-07-14 19:02 +0200
http://bitbucket.org/cffi/cffi/changeset/a7084bcbadd8/
Log: Add a similar test for delattr, which already works.
diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -1569,3 +1569,10 @@
BCharP = new_pointer_type(BChar)
x = newp(BCharP)
py.test.raises(TypeError, "del x[0]")
+
+def test_bug_delattr():
+ BLong = new_primitive_type("long")
+ BStruct = new_struct_type("foo")
+ complete_struct_or_union(BStruct, [('a1', BLong, -1)])
+ x = newp(new_pointer_type(BStruct))
+ py.test.raises(AttributeError, "del x.a1")
More information about the pypy-commit
mailing list