tests: Make bytes/str.count() tests skippable.
This commit is contained in:
parent
5a91fce9f8
commit
a527313382
|
@ -1,3 +1,9 @@
|
||||||
|
try:
|
||||||
|
bytes.count
|
||||||
|
except AttributeError:
|
||||||
|
print("SKIP")
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
print(b"".count(b""))
|
print(b"".count(b""))
|
||||||
print(b"".count(b"a"))
|
print(b"".count(b"a"))
|
||||||
print(b"a".count(b""))
|
print(b"a".count(b""))
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
try:
|
||||||
|
str.count
|
||||||
|
except AttributeError:
|
||||||
|
print("SKIP")
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
print("".count(""))
|
print("".count(""))
|
||||||
print("".count("a"))
|
print("".count("a"))
|
||||||
print("a".count(""))
|
print("a".count(""))
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
try:
|
||||||
|
str.count
|
||||||
|
except AttributeError:
|
||||||
|
print("SKIP")
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
# mad.py
|
# mad.py
|
||||||
# Alf Clement 27-Mar-2014
|
# Alf Clement 27-Mar-2014
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue