From: Stefan Behnel Date: Sat, 17 Jul 2010 10:21:39 +0000 (+0200) Subject: moved new listcomp test over to existing test module for list comprehensions X-Git-Tag: 0.13.beta0~2^2~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b67d841ceac1a20807455422964edeae562ae0f6;p=cython.git moved new listcomp test over to existing test module for list comprehensions --- diff --git a/tests/run/list_comprehension.pyx b/tests/run/list_comprehension.pyx deleted file mode 100644 index 2360a713..00000000 --- a/tests/run/list_comprehension.pyx +++ /dev/null @@ -1,8 +0,0 @@ - -def foo(): - """ - >>> foo() - [[], [-1], [-1, 0], [-1, 0, 1]] - """ - result = [[a-1 for a in range(b)] for b in range(4)] - return result diff --git a/tests/run/listcomp.pyx b/tests/run/listcomp.pyx index 0680aa2a..1d9a38f6 100644 --- a/tests/run/listcomp.pyx +++ b/tests/run/listcomp.pyx @@ -55,3 +55,11 @@ def global_listcomp(): >>> listcomp_result [0, 1, 4, 9, 16] """ + +def nested_result(): + """ + >>> nested_result() + [[], [-1], [-1, 0], [-1, 0, 1]] + """ + result = [[a-1 for a in range(b)] for b in range(4)] + return result