tests/basics: bytes/str.partition/rpartition are now optional.
Skip tests if not available.
This commit is contained in:
parent
f84dda7111
commit
8897dcb2a1
@ -1,3 +1,10 @@
|
||||
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'))
|
||||
|
@ -1,3 +1,10 @@
|
||||
try:
|
||||
str.partition
|
||||
except AttributeError:
|
||||
print("SKIP")
|
||||
import sys
|
||||
sys.exit()
|
||||
|
||||
print("asdf".partition('g'))
|
||||
print("asdf".partition('a'))
|
||||
print("asdf".partition('s'))
|
||||
|
@ -1,3 +1,10 @@
|
||||
try:
|
||||
str.partition
|
||||
except AttributeError:
|
||||
print("SKIP")
|
||||
import sys
|
||||
sys.exit()
|
||||
|
||||
print("asdf".rpartition('g'))
|
||||
print("asdf".rpartition('a'))
|
||||
print("asdf".rpartition('s'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user