Commit 8897dcb2 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

tests/basics: bytes/str.partition/rpartition are now optional.

Skip tests if not available.
parent f84dda71
try:
str.partition
except AttributeError:
print("SKIP")
import sys
sys.exit()
print(b"asdf".partition(b'g'))
print(b"asdf".partition(b'a'))
print(b"asdf".partition(b's'))
......
try:
str.partition
except AttributeError:
print("SKIP")
import sys
sys.exit()
print("asdf".partition('g'))
print("asdf".partition('a'))
print("asdf".partition('s'))
......
try:
str.partition
except AttributeError:
print("SKIP")
import sys
sys.exit()
print("asdf".rpartition('g'))
print("asdf".rpartition('a'))
print("asdf".rpartition('s'))
......
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