* fix #8242, fix #12586: fix 'formatFloat' with 'precision = 0' 'formatFloat' with 'precision = 0' now gives the same result (a number without a decimal point) in all backends. This is compatible with Python's formatters, too. * fix failing tests * add changelog entry * add version switch
This commit is contained in:
parent
46af8164c0
commit
ffa9a7405f
4 changed files with 39 additions and 28 deletions
|
|
@ -692,12 +692,11 @@ when isMainModule:
|
|||
check &"{-123.456:.3f}", "-123.456"
|
||||
check &"{123.456:1g}", "123.456"
|
||||
check &"{123.456:.1f}", "123.5"
|
||||
check &"{123.456:.0f}", "123."
|
||||
#check &"{123.456:.0f}", "123."
|
||||
check &"{123.456:.0f}", "123"
|
||||
check &"{123.456:>9.3f}", " 123.456"
|
||||
check &"{123.456:9.3f}", " 123.456"
|
||||
check &"{123.456:>9.4f}", " 123.4560"
|
||||
check &"{123.456:>9.0f}", " 123."
|
||||
check &"{123.456:>9.0f}", " 123"
|
||||
check &"{123.456:<9.4f}", "123.4560 "
|
||||
|
||||
# Float (scientific) tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue