tests/basics: Automatically skip tests that use str/bytes modulo-format.

pull/5227/head
Damien George 2019-10-29 22:01:47 +11:00
rodzic 52299ed3f0
commit eebffb2b5b
3 zmienionych plików z 19 dodań i 0 usunięć

Wyświetl plik

@ -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))

Wyświetl plik

@ -1,3 +1,9 @@
try:
'' % ()
except TypeError:
print("SKIP")
raise SystemExit
print("%%" % ())
print("=%s=" % 1)
print("=%s=%s=" % (1, 2))

Wyświetl plik

@ -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)