You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
16 lines
230 B
Python
16 lines
230 B
Python
# Self-checking test.
|
|
# Tests of Python slice operators
|
|
|
|
ary = [1,2,3,4,5]
|
|
|
|
# Forces BUILD_SLICE 2 on 3.x
|
|
a = ary[:2]
|
|
assert a == [1, 2]
|
|
|
|
a = ary[2:]
|
|
assert a == [3, 4, 5]
|
|
|
|
# Forces BUILD_SLICE 3
|
|
a = ary[1:4:2]
|
|
assert a == [2, 4]
|