incomplete error test case for cdef class attribute assignments
authorStefan Behnel <scoder@users.berlios.de>
Sun, 3 Aug 2008 11:12:47 +0000 (13:12 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 3 Aug 2008 11:12:47 +0000 (13:12 +0200)
tests/errors/extclassattrsetting.pyx [new file with mode: 0644]

diff --git a/tests/errors/extclassattrsetting.pyx b/tests/errors/extclassattrsetting.pyx
new file mode 100644 (file)
index 0000000..065de82
--- /dev/null
@@ -0,0 +1,17 @@
+__doc__ = u"""
+>>> e = ExtClass()
+>>> e.get()
+5
+"""
+
+cdef class ExtClass:
+    cdef int _attribute = 2
+
+    def get(self):
+        return self._attribute
+
+    _attribute = 5     # FIXME: this is not currently handled!!!
+
+_ERRORS = u"""
+8:13: Cannot assign default value to cdef class attributes
+"""