Commit 9464cde3 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

Unbreak string slice test by just switching to normal (not byte) strings.

parent 21dfb55d
print(b"123"[0:1])
print(b"123"[0:2])
print(b"123"[:1])
print(b"123"[1:])
# Idiom for copying sequence
print(b"123"[:])
print(b"123"[:-1])
# Weird cases
print(b"123"[0:0])
print(b"123"[1:0])
print(b"123"[1:1])
print(b"123"[-1:-1])
print(b"123"[-3:])
print(b"123"[-3:3])
print(b"123"[0:])
print(b"123"[:0])
print(b"123"[:-3])
print(b"123"[:-4])
# Range check testing, don't segfault, please ;-)
print(b"123"[:1000000])
print(b"123"[1000000:])
print(b"123"[:-1000000])
print(b"123"[-1000000:])
# No IndexError!
print(b""[1:1])
print(b""[-1:-1])
print("123"[0:1])
print("123"[0:2])
print("123"[:1])
print("123"[1:])
# Idiom for copying sequence
print("123"[:])
print("123"[:-1])
# Weird cases
print("123"[0:0])
print("123"[1:0])
print("123"[1:1])
print("123"[-1:-1])
print("123"[-3:])
print("123"[-3:3])
print("123"[0:])
print("123"[:0])
print("123"[:-3])
print("123"[:-4])
# Range check testing, don't segfault, please ;-)
print("123"[:1000000])
print("123"[1000000:])
print("123"[:-1000000])
print("123"[-1000000:])
# No IndexError!
print(""[1:1])
print(""[-1:-1])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment