lv_micropython/tests/basics/for_break.py
Paul Sokolovsky ccd0e0afcd tests: Add test for break in for.
For #635 / 25c84643b6c4da169cdb11de54f027e3c477c301.
2014-05-31 00:43:41 +03:00

16 lines
292 B
Python

# Testcase for break in a for [within bunch of other code]
# https://github.com/micropython/micropython/issues/635
def foo():
seq = [1, 2, 3]
v = 100
i = 5
while i > 0:
print(i)
for a in seq:
if a == 2:
break
i -= 1
foo()