diff options
-rw-r--r-- | tests/basics/string_format_modulo_int.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/basics/string_format_modulo_int.py b/tests/basics/string_format_modulo_int.py new file mode 100644 index 0000000000..c97bca9bdb --- /dev/null +++ b/tests/basics/string_format_modulo_int.py @@ -0,0 +1,7 @@ +# test string modulo formatting with int values + +# test + option with various amount of padding +for pad in ('', ' ', '0'): + for n in (1, 2, 3): + for val in (-1, 0, 1): + print(('%+' + pad + str(n) + 'd') % val) |