From 141982201dcd03b7c4339c1955b4e3691f1faa5d Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 3 Aug 2008 13:12:47 +0200 Subject: [PATCH] incomplete error test case for cdef class attribute assignments --- tests/errors/extclassattrsetting.pyx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/errors/extclassattrsetting.pyx diff --git a/tests/errors/extclassattrsetting.pyx b/tests/errors/extclassattrsetting.pyx new file mode 100644 index 00000000..065de826 --- /dev/null +++ b/tests/errors/extclassattrsetting.pyx @@ -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 +""" -- 2.26.2