more tests for #477
authorLisandro Dalcin <dalcinl@gmail.com>
Thu, 7 Apr 2011 13:47:10 +0000 (10:47 -0300)
committerLisandro Dalcin <dalcinl@gmail.com>
Thu, 7 Apr 2011 13:47:10 +0000 (10:47 -0300)
tests/run/cdef_locals_decorator_T477.pyx

index 617f011a8fc6118c55d65e88b6c4b9a83a9e2584..2b40d05ad635c8b9c74f6bb85aaa0bdd5bd0425e 100644 (file)
@@ -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)