ipow_crash_T562
pure_mode_cmethod_inheritance_T583
list_comp_in_closure_T598
+genexpr_iterable_lookup_T600
# CPython regression tests that don't current work:
pyregr.test_threadsignals
--- /dev/null
+
+cimport cython
+
+@cython.test_assert_path_exists('//ComprehensionNode')
+@cython.test_fail_if_path_exists('//SimpleCallNode')
+def list_genexpr_iterable_lookup():
+ """
+ >>> x = (0,1,2,3,4,5)
+ >>> [ x*2 for x in x if x % 2 == 0 ] # leaks in Py2 but finds the right 'x'
+ [0, 4, 8]
+
+ >>> list_genexpr_iterable_lookup()
+ [0, 4, 8]
+ """
+ x = (0,1,2,3,4,5)
+ result = list( x*2 for x in x if x % 2 == 0 )
+ assert x == (0,1,2,3,4,5)
+ return result