tests/basics/builtin_range: Add test for corner case of range slicing.
This commit is contained in:
parent
505671b698
commit
c7a0e1472d
|
@ -38,6 +38,9 @@ print(range(1, 100, 5)[15:5:-3])
|
||||||
print(range(100, 1, -5)[5:15:3])
|
print(range(100, 1, -5)[5:15:3])
|
||||||
print(range(100, 1, -5)[15:5:-3])
|
print(range(100, 1, -5)[15:5:-3])
|
||||||
|
|
||||||
|
# for this case uPy gives a different stop value but the listed elements are still correct
|
||||||
|
print(list(range(7, -2, -4)[2:-2:]))
|
||||||
|
|
||||||
# zero step
|
# zero step
|
||||||
try:
|
try:
|
||||||
range(1, 2, 0)
|
range(1, 2, 0)
|
||||||
|
|
Loading…
Reference in New Issue