From: Stefan Behnel Date: Sun, 6 Dec 2009 13:52:52 +0000 (+0100) Subject: test fix: work around the fact that list comp variables now appear in locals() X-Git-Tag: 0.12.1~68 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=91075fb369f553a3758c9a77a22bf48429829efd;p=cython.git test fix: work around the fact that list comp variables now appear in locals() --- diff --git a/tests/run/locals_expressions_T430.pyx b/tests/run/locals_expressions_T430.pyx index f05c5be2..3d7d38cd 100644 --- a/tests/run/locals_expressions_T430.pyx +++ b/tests/run/locals_expressions_T430.pyx @@ -6,7 +6,7 @@ __doc__ = u""" [('args', (2, 3)), ('kwds', {'k': 5}), ('x', 1), ('y', 'hi'), ('z', 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): @@ -20,6 +20,7 @@ def get_locals_items(x, *args, **kwds): return locals().items() def get_locals_items_listcomp(x, *args, **kwds): + # FIXME: 'item' should *not* appear in locals() ! cdef int z = 5 y = "hi" return [ item for item in locals().items() ]