Browse Source

tests/basics: Split out specific slice tests to separate files.

So they can be automatically skipped if slice is not enabled.
pull/5227/head
Damien George 5 years ago
parent
commit
b5186c9271
  1. 4
      tests/basics/list1.py
  2. 5
      tests/basics/list_slice.py
  3. 4
      tests/basics/tuple1.py
  4. 7
      tests/basics/tuple_slice.py

4
tests/basics/list1.py

@ -19,10 +19,6 @@ print(x)
x += [2, 1]
print(x)
print(x[1:])
print(x[:-1])
print(x[2:3])
# unsupported type on RHS of add
try:
[] + None

5
tests/basics/list_slice.py

@ -1,6 +1,11 @@
# test list slices, getting values
x = list(range(10))
print(x[1:])
print(x[:-1])
print(x[2:3])
a = 2
b = 4
c = 3

4
tests/basics/tuple1.py

@ -11,10 +11,6 @@ try:
except AttributeError:
print("AttributeError")
print(x[1:])
print(x[:-1])
print(x[2:3])
print(x + (10, 100, 10000))
# inplace add operator

7
tests/basics/tuple_slice.py

@ -0,0 +1,7 @@
# tuple slicing
x = (1, 2, 3 * 4)
print(x[1:])
print(x[:-1])
print(x[2:3])
Loading…
Cancel
Save