summaryrefslogtreecommitdiff
path: root/tests/run/locals.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/locals.pyx')
-rw-r--r--tests/run/locals.pyx10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/run/locals.pyx b/tests/run/locals.pyx
index f343fe1cb..9473ad01e 100644
--- a/tests/run/locals.pyx
+++ b/tests/run/locals.pyx
@@ -113,3 +113,13 @@ def buffers_in_locals(object[char, ndim=1] a):
cdef object[unsigned char, ndim=1] b = a
return locals()
+
+def set_comp_scope():
+ """
+ locals should be evaluated in the outer scope
+ >>> list(set_comp_scope())
+ ['something']
+ """
+ something = 1
+ return { b for b in locals().keys() }
+