diff options
author | Damien George <damien.p.george@gmail.com> | 2015-05-28 14:22:12 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-05-28 14:22:12 +0000 |
commit | 79474c6b164fb66a8d348bfa57613f9dbf5af4e8 (patch) | |
tree | d449229d7ee01f114d092a624943bb42d79a72a5 /tests/float/string_format_modulo.py | |
parent | 2cae0f62908812b6cd925943ee70e7e0bef0387e (diff) | |
download | micropython-79474c6b164fb66a8d348bfa57613f9dbf5af4e8.tar.gz micropython-79474c6b164fb66a8d348bfa57613f9dbf5af4e8.zip |
py: Remove unnecessary extra handling of padding of nan/inf.
C's printf will pad nan/inf differently to CPython. Our implementation
originally conformed to C, now it conforms to CPython's way.
Tests for this are also added in this patch.
Diffstat (limited to 'tests/float/string_format_modulo.py')
-rw-r--r-- | tests/float/string_format_modulo.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/float/string_format_modulo.py b/tests/float/string_format_modulo.py index ddca0b5555..11df9abbd2 100644 --- a/tests/float/string_format_modulo.py +++ b/tests/float/string_format_modulo.py @@ -17,3 +17,7 @@ print("%f" % 1.23456) print("%F" % 1.23456) print("%g" % 1.23456) print("%G" % 1.23456) + +print("%06e" % float("inf")) +print("%06e" % float("-inf")) +print("%06e" % float("nan")) |