From c7a0e1472da8e1b8e359bc26f838ab20bab00a8a Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 24 Nov 2017 15:30:12 +1100 Subject: [PATCH] tests/basics/builtin_range: Add test for corner case of range slicing. --- tests/basics/builtin_range.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/basics/builtin_range.py b/tests/basics/builtin_range.py index 0e2fabd82e..66226bad16 100644 --- a/tests/basics/builtin_range.py +++ b/tests/basics/builtin_range.py @@ -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)[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 try: range(1, 2, 0)