2016-08-07 20:14:34 +01:00
|
|
|
try:
|
|
|
|
str.partition
|
|
|
|
except AttributeError:
|
|
|
|
print("SKIP")
|
2017-06-10 18:03:01 +01:00
|
|
|
raise SystemExit
|
2016-08-07 20:14:34 +01:00
|
|
|
|
2014-12-24 20:28:30 +00:00
|
|
|
print(b"asdf".partition(b'g'))
|
|
|
|
print(b"asdf".partition(b'a'))
|
|
|
|
print(b"asdf".partition(b's'))
|
|
|
|
print(b"asdf".partition(b'f'))
|
|
|
|
print(b"asdf".partition(b'd'))
|
|
|
|
print(b"asdf".partition(b'asd'))
|
|
|
|
print(b"asdf".partition(b'sdf'))
|
|
|
|
print(b"asdf".partition(b'as'))
|
|
|
|
print(b"asdf".partition(b'df'))
|
|
|
|
print(b"asdf".partition(b'asdf'))
|
|
|
|
print(b"asdf".partition(b'asdfa'))
|
|
|
|
print(b"asdf".partition(b'fasdf'))
|
|
|
|
print(b"asdf".partition(b'fasdfa'))
|
|
|
|
print(b"abba".partition(b'a'))
|
|
|
|
print(b"abba".partition(b'b'))
|
|
|
|
|
|
|
|
try:
|
|
|
|
print(b"asdf".partition(1))
|
|
|
|
except TypeError:
|
|
|
|
print("Raised TypeError")
|
|
|
|
else:
|
|
|
|
print("Did not raise TypeError")
|
|
|
|
|
|
|
|
try:
|
|
|
|
print(b"asdf".partition(b''))
|
|
|
|
except ValueError:
|
|
|
|
print("Raised ValueError")
|
|
|
|
else:
|
|
|
|
print("Did not raise ValueError")
|