diff options
author | Damien George <damien.p.george@gmail.com> | 2015-05-28 14:24:47 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-05-28 14:24:47 +0000 |
commit | 9ede4dcfbb31a4adbd729466d72a1d10aa81b4fc (patch) | |
tree | 9900d522693a4470072be03c5dbffd56311cd1ce /tests/float/string_format_modulo.py | |
parent | 79474c6b164fb66a8d348bfa57613f9dbf5af4e8 (diff) |
tests: Add some tests for printing floats to improve coverage.
Diffstat (limited to 'tests/float/string_format_modulo.py')
-rw-r--r-- | tests/float/string_format_modulo.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/float/string_format_modulo.py b/tests/float/string_format_modulo.py index 11df9abbd..03b178703 100644 --- a/tests/float/string_format_modulo.py +++ b/tests/float/string_format_modulo.py @@ -21,3 +21,8 @@ print("%G" % 1.23456) print("%06e" % float("inf")) print("%06e" % float("-inf")) print("%06e" % float("nan")) + +print("%02.3d" % 123) # prec > width +print("%+f %+f" % (1.23, -1.23)) # float sign +print("% f % f" % (1.23, -1.23)) # float space sign +print("%0f" % -1.23) # negative number with 0 padding |