Skip to content

Commit c7a0e14

Browse files
committed
tests/basics/builtin_range: Add test for corner case of range slicing.
1 parent 505671b commit c7a0e14

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/basics/builtin_range.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
print(range(100, 1, -5)[5:15:3])
3939
print(range(100, 1, -5)[15:5:-3])
4040

41+
# for this case uPy gives a different stop value but the listed elements are still correct
42+
print(list(range(7, -2, -4)[2:-2:]))
43+
4144
# zero step
4245
try:
4346
range(1, 2, 0)

0 commit comments

Comments
 (0)