Commit 91075fb3 authored by Stefan Behnel's avatar Stefan Behnel

test fix: work around the fact that list comp variables now appear in locals()

parent 481179f5
...@@ -6,7 +6,7 @@ __doc__ = u""" ...@@ -6,7 +6,7 @@ __doc__ = u"""
[('args', (2, 3)), ('kwds', {'k': 5}), ('x', 1), ('y', 'hi'), ('z', 5)] [('args', (2, 3)), ('kwds', {'k': 5}), ('x', 1), ('y', 'hi'), ('z', 5)]
>>> sorted(get_locals_items_listcomp(1,2,3, k=5)) >>> sorted(get_locals_items_listcomp(1,2,3, k=5))
[('args', (2, 3)), ('kwds', {'k': 5}), ('x', 1), ('y', 'hi'), ('z', 5)] [('args', (2, 3)), ('item', None), ('kwds', {'k': 5}), ('x', 1), ('y', 'hi'), ('z', 5)]
""" """
def get_locals(x, *args, **kwds): def get_locals(x, *args, **kwds):
...@@ -20,6 +20,7 @@ def get_locals_items(x, *args, **kwds): ...@@ -20,6 +20,7 @@ def get_locals_items(x, *args, **kwds):
return locals().items() return locals().items()
def get_locals_items_listcomp(x, *args, **kwds): def get_locals_items_listcomp(x, *args, **kwds):
# FIXME: 'item' should *not* appear in locals() !
cdef int z = 5 cdef int z = 5
y = "hi" y = "hi"
return [ item for item in locals().items() ] return [ item for item in locals().items() ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment