From 12ad1ee88190bd5d76dd30f29adfe6abfd5c4236 Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Thu, 15 Oct 2009 09:14:33 +0200 Subject: [PATCH] Testcase for #373 --- tests/run/typeddefaultargT373.pyx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/run/typeddefaultargT373.pyx diff --git a/tests/run/typeddefaultargT373.pyx b/tests/run/typeddefaultargT373.pyx new file mode 100644 index 00000000..bfb6047a --- /dev/null +++ b/tests/run/typeddefaultargT373.pyx @@ -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 -- 2.26.2