diff options
author | Damien George <damien.p.george@gmail.com> | 2019-10-29 22:01:47 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-10-29 22:22:37 +1100 |
commit | eebffb2b5b46dae65eeef8290146112348415221 (patch) | |
tree | 27e16a451d0d24513b043a7e2fe601f60db3224a | |
parent | 52299ed3f011b50feb58c226764e08a995fad305 (diff) |
tests/basics: Automatically skip tests that use str/bytes modulo-format.
-rw-r--r-- | tests/basics/bytes_format_modulo.py | 7 | ||||
-rw-r--r-- | tests/basics/string_format_modulo.py | 6 | ||||
-rw-r--r-- | tests/basics/string_format_modulo_int.py | 6 |
3 files changed, 19 insertions, 0 deletions
diff --git a/tests/basics/bytes_format_modulo.py b/tests/basics/bytes_format_modulo.py index 70246e72d..b928f593e 100644 --- a/tests/basics/bytes_format_modulo.py +++ b/tests/basics/bytes_format_modulo.py @@ -1,4 +1,11 @@ # This test requires CPython3.5 + +try: + b'' % () +except TypeError: + print("SKIP") + raise SystemExit + print(b"%%" % ()) print(b"=%d=" % 1) print(b"=%d=%d=" % (1, 2)) diff --git a/tests/basics/string_format_modulo.py b/tests/basics/string_format_modulo.py index 77bbcfbe3..021b5f08d 100644 --- a/tests/basics/string_format_modulo.py +++ b/tests/basics/string_format_modulo.py @@ -1,3 +1,9 @@ +try: + '' % () +except TypeError: + print("SKIP") + raise SystemExit + print("%%" % ()) print("=%s=" % 1) print("=%s=%s=" % (1, 2)) diff --git a/tests/basics/string_format_modulo_int.py b/tests/basics/string_format_modulo_int.py index d1f29db22..d057522bf 100644 --- a/tests/basics/string_format_modulo_int.py +++ b/tests/basics/string_format_modulo_int.py @@ -1,5 +1,11 @@ # test string modulo formatting with int values +try: + '' % () +except TypeError: + print("SKIP") + raise SystemExit + # basic cases print("%d" % 10) print("%+d" % 10) |