From b23fde17e1622bcd54506cdf61e2efad58737357 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 8 May 2010 22:35:17 +0200 Subject: [PATCH] test for ticket #533: reference leak in 'continue' statement --- tests/bugs.txt | 1 + tests/run/for_in_break_continue_T533.pyx | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/run/for_in_break_continue_T533.pyx diff --git a/tests/bugs.txt b/tests/bugs.txt index 8a3837d4..89742374 100644 --- a/tests/bugs.txt +++ b/tests/bugs.txt @@ -9,6 +9,7 @@ missing_baseclass_in_predecl_T262 cfunc_call_tuple_args_T408 cascaded_list_unpacking_T467 compile.cpp_operators +for_in_break_continue_T533 # CPython regression tests that don't current work: pyregr.test_threadsignals diff --git a/tests/run/for_in_break_continue_T533.pyx b/tests/run/for_in_break_continue_T533.pyx new file mode 100644 index 00000000..0608258a --- /dev/null +++ b/tests/run/for_in_break_continue_T533.pyx @@ -0,0 +1,15 @@ + +def for_in(): + """ + >>> for_in() + 6 + """ + i = -1 + for L in [[], range(5), range(10)]: + for i in L: + if i > 5: + break + else: + continue + break + return i -- 2.26.2