From 297f652d5ab3f166f98df3d1571ff1c883f7cc55 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 26 Jan 2011 21:49:09 +0100 Subject: [PATCH] test case for ticket #654 --- .../function_argument_sideeffects_T654.pyx | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/run/function_argument_sideeffects_T654.pyx 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()) -- 2.26.2