Skip to content

Commit ccd0e0a

Browse files
committed
tests: Add test for break in for.
For adafruit#635 / 25c8464.
1 parent 25c8464 commit ccd0e0a

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/basics/for_break.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Testcase for break in a for [within bunch of other code]
2+
# https://github.com/micropython/micropython/issues/635
3+
4+
def foo():
5+
seq = [1, 2, 3]
6+
v = 100
7+
i = 5
8+
while i > 0:
9+
print(i)
10+
for a in seq:
11+
if a == 2:
12+
break
13+
i -= 1
14+
15+
foo()

0 commit comments

Comments
 (0)