diff options
author | Damien George <damien.p.george@gmail.com> | 2017-03-15 17:31:17 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-03-15 17:31:17 +1100 |
commit | b154468b085dad53de8fdef09ec42c8518475556 (patch) | |
tree | 9a7fbef718aadcb7227981c0c6045e6686d2b665 | |
parent | 3a0b2be6e28b5bd8f44bd4d05fa99850630a9338 (diff) |
tests/basics: Add test for string module formatting with int argument.
-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 000000000..c97bca9bd --- /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) |