mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 11:10:14 +01:00
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.
This commit is contained in:
@@ -23,6 +23,10 @@ test("{:10.4F}", -123.456)
|
||||
test("{:10.4G}", 123.456)
|
||||
test("{:10.4G}", -123.456)
|
||||
|
||||
test("{:06e}", float("inf"))
|
||||
test("{:06e}", float("-inf"))
|
||||
test("{:06e}", float("nan"))
|
||||
|
||||
# The following fails right now
|
||||
#test("{:10.1}", 0.0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user