From: Stefan Behnel Date: Wed, 26 Jan 2011 20:49:09 +0000 (+0100) Subject: test case for ticket #654 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=297f652d5ab3f166f98df3d1571ff1c883f7cc55;p=cython.git test case for ticket #654 --- diff --git a/tests/run/function_argument_sideeffects_T654.pyx b/tests/run/function_argument_sideeffects_T654.pyx new file mode 100644 index 00000000..8080f64c --- /dev/null +++ b/tests/run/function_argument_sideeffects_T654.pyx @@ -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())