diff --git a/tests/basics/bytes_partition.py b/tests/basics/bytes_partition.py index 3868a81a55..7d3ffaaaaa 100644 --- a/tests/basics/bytes_partition.py +++ b/tests/basics/bytes_partition.py @@ -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')) diff --git a/tests/basics/string_partition.py b/tests/basics/string_partition.py index fe0070a658..b3b2f0907d 100644 --- a/tests/basics/string_partition.py +++ b/tests/basics/string_partition.py @@ -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')) diff --git a/tests/basics/string_rpartition.py b/tests/basics/string_rpartition.py index 656121c94d..84e0031fb0 100644 --- a/tests/basics/string_rpartition.py +++ b/tests/basics/string_rpartition.py @@ -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'))