From 91075fb369f553a3758c9a77a22bf48429829efd Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 6 Dec 2009 14:52:52 +0100 Subject: [PATCH] test fix: work around the fact that list comp variables now appear in locals() --- tests/run/locals_expressions_T430.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() ] -- 2.26.2