Browse Source

tests/basics/list_slice_3arg: Add more tests for negative slicing.

pull/3096/head
Damien George 8 years ago
parent
commit
e1b0f2a16f
  1. 11
      tests/basics/list_slice_3arg.py

11
tests/basics/list_slice_3arg.py

@ -26,3 +26,14 @@ print(x[-1:-1:-1])
print(x[-1:-2:-1])
print(x[-1:-11:-1])
print(x[-10:-11:-1])
print(x[:-15:-1])
# test negative indices that are out-of-bounds
print([][::-1])
print([1][::-1])
print([][0:-10:-1])
print([1][0:-10:-1])
print([][:-20:-1])
print([1][:-20:-1])
print([][-20::-1])
print([1][-20::-1])

Loading…
Cancel
Save