tests/basics: Add test for string module formatting with int argument.

This commit is contained in:
Damien George 2017-03-15 17:31:17 +11:00
parent 3a0b2be6e2
commit b154468b08
1 changed files with 7 additions and 0 deletions

View File

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