Skip to content

Commit

Permalink
tests: Make bytes/str.count() tests skippable.
Browse files Browse the repository at this point in the history
  • Loading branch information
pfalcon authored and dpgeorge committed Oct 22, 2018
1 parent 5a91fce commit a527313
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/basics/bytes_count.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
try:
bytes.count
except AttributeError:
print("SKIP")
raise SystemExit

print(b"".count(b""))
print(b"".count(b"a"))
print(b"a".count(b""))
Expand Down
6 changes: 6 additions & 0 deletions tests/basics/string_count.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
try:
str.count
except AttributeError:
print("SKIP")
raise SystemExit

print("".count(""))
print("".count("a"))
print("a".count(""))
Expand Down
6 changes: 6 additions & 0 deletions tests/misc/features.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
try:
str.count
except AttributeError:
print("SKIP")
raise SystemExit

# mad.py
# Alf Clement 27-Mar-2014
#
Expand Down

0 comments on commit a527313

Please sign in to comment.