diff options
| author | Armin Rigo <arigo@tunes.org> | 2017-01-25 00:44:48 +0100 |
|---|---|---|
| committer | Armin Rigo <arigo@tunes.org> | 2017-01-25 00:44:48 +0100 |
| commit | f0a21999115b31814835e8a8e55c916a49c4ee89 (patch) | |
| tree | b76dd7b00ac089d3450eb807be86caf5e159cd91 | |
| parent | 068928cca60a7a9c51438b28bff3cd3f24b432fc (diff) | |
| download | cffi-f0a21999115b31814835e8a8e55c916a49c4ee89.tar.gz | |
extra tests
| -rw-r--r-- | c/test_c.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/c/test_c.py b/c/test_c.py index 932ad5a..fdc14ef 100644 --- a/c/test_c.py +++ b/c/test_c.py @@ -784,6 +784,11 @@ def test_struct_instance(): 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") |
