From: Lisandro Dalcin Date: Thu, 7 Apr 2011 13:47:10 +0000 (-0300) Subject: more tests for #477 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=4c333a898f5de90e828a14f594b5a35609ba438f;p=cython.git more tests for #477 --- diff --git a/tests/run/cdef_locals_decorator_T477.pyx b/tests/run/cdef_locals_decorator_T477.pyx index 617f011a..2b40d05a 100644 --- a/tests/run/cdef_locals_decorator_T477.pyx +++ b/tests/run/cdef_locals_decorator_T477.pyx @@ -15,3 +15,17 @@ def test(): True """ return func(2) + +def test_defval(x=None): + """ + >>> test_defval() + 0.0 + >>> test_defval(1) + 1.0 + >>> test_defval(2.0) + 4.0 + """ + if x is None: + return func_defval() + else: + return func_defval(x)