Testcase for #373
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Thu, 15 Oct 2009 07:14:33 +0000 (09:14 +0200)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Thu, 15 Oct 2009 07:14:33 +0000 (09:14 +0200)
tests/run/typeddefaultargT373.pyx [new file with mode: 0644]

diff --git a/tests/run/typeddefaultargT373.pyx b/tests/run/typeddefaultargT373.pyx
new file mode 100644 (file)
index 0000000..bfb6047
--- /dev/null
@@ -0,0 +1,17 @@
+import math
+
+cdef class MyClass:
+    """
+    >>> x=MyClass()
+    4
+    """
+    def __cinit__(self, int arg=2*2):
+        print arg
+
+cdef class MyOtherClass:
+    """
+    >>> x=MyOtherClass()
+    8
+    """
+    def __cinit__(self, int arg=4*int(math.sqrt(4))):
+        print arg