test case for ticket #654
authorStefan Behnel <scoder@users.berlios.de>
Wed, 26 Jan 2011 20:49:09 +0000 (21:49 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Wed, 26 Jan 2011 20:49:09 +0000 (21:49 +0100)
tests/run/function_argument_sideeffects_T654.pyx [new file with mode: 0644]

diff --git a/tests/run/function_argument_sideeffects_T654.pyx b/tests/run/function_argument_sideeffects_T654.pyx
new file mode 100644 (file)
index 0000000..8080f64
--- /dev/null
@@ -0,0 +1,24 @@
+
+order = []
+
+cdef int f():
+    order.append(1)
+    return 1
+
+def g():
+    order.append(2)
+    return 2
+
+cdef call(int x, object o):
+    return x, o
+
+def test():
+    """
+    >>> order
+    []
+    >>> test()
+    (1, 2)
+    >>> order
+    [1, 2]
+    """
+    return call(f(), g())