Skip to content

Commit 8a7f0b6

Browse files
add an assertion in about_lists.test_ranges_with_steps to demonstrate a descending list with a step of -1.
1 parent 3685a39 commit 8a7f0b6

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

python2/koans/about_lists.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def test_ranges_with_steps(self):
6262
self.assertEqual(__, range(1, 8, 3))
6363
self.assertEqual(__, range(5, -7, -4))
6464
self.assertEqual(__, range(5, -8, -4))
65+
self.assertEqual(__, list(range(5, 3, -1)))
6566

6667
def test_insertions(self):
6768
knight = ['you', 'shall', 'pass']

python3/koans/about_lists.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def test_ranges_with_steps(self):
6262
self.assertEqual(__, list(range(1, 8, 3)))
6363
self.assertEqual(__, list(range(5, -7, -4)))
6464
self.assertEqual(__, list(range(5, -8, -4)))
65+
self.assertEqual(__, list(range(5, 3, -1)))
6566

6667
def test_insertions(self):
6768
knight = ['you', 'shall', 'pass']

0 commit comments

Comments
 (0)