test case for ticket #462
authorStefan Behnel <scoder@users.berlios.de>
Sat, 5 Dec 2009 13:26:15 +0000 (14:26 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 5 Dec 2009 13:26:15 +0000 (14:26 +0100)
tests/bugs.txt
tests/run/cdef_methods_T462.pyx [new file with mode: 0644]

index 55e7e2c3df15948183cbb2335604ab9c3cdb361e..b41b895a4a70079cfd1af094de156971328776f6 100644 (file)
@@ -7,3 +7,4 @@ numpy_ValueError_T172
 unsignedbehaviour_T184
 missing_baseclass_in_predecl_T262
 cfunc_call_tuple_args_T408
+cdef_methods_T462
diff --git a/tests/run/cdef_methods_T462.pyx b/tests/run/cdef_methods_T462.pyx
new file mode 100644 (file)
index 0000000..7a5bc34
--- /dev/null
@@ -0,0 +1,31 @@
+
+cimport cython
+
+cdef class cclass:
+    def test_self(self):
+        """
+        >>> cclass().test_self()
+        'cclass'
+        """
+        return cython.typeof(self)
+
+    def test_self_1(self, arg):
+        """
+        >>> cclass().test_self_1(1)
+        ('cclass', (1,))
+        """
+        return cython.typeof(self), arg
+
+    def test_self_args(self, *args):
+        """
+        >>> cclass().normal_test1_args(1,2,3)
+        ('cclass', (1, 2, 3))
+        """
+        return cython.typeof(self), args
+
+    def test_args(*args):
+        """
+        >>> cclass().normal_test0_args(1,2,3):
+        ("Python object", (1, 2, 3))
+        """
+        return cython.typeof(args[0]), args[1:]