From f5911810363aaca58a343e8788f83b29e6be9ef9 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 22 Nov 2010 08:45:19 +0100 Subject: [PATCH] Py3 locals test --- tests/run/cython3.pyx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/run/cython3.pyx b/tests/run/cython3.pyx index 04a569bb..17129986 100644 --- a/tests/run/cython3.pyx +++ b/tests/run/cython3.pyx @@ -17,6 +17,19 @@ def print_function(*args): """ print(*args) # this isn't valid Py2 syntax +def locals_function(a, b=2): + """ + >>> items = list(locals_function(1).items()) + >>> items.sort() + >>> for item in items: + ... print('%s = %r' % item) + a = 1 + b = 2 + x = 'abc' + """ + x = 'abc' + return locals() + def exec3_function(cmd): """ >>> exec3_function('a = 1+1')['a'] -- 2.26.2