mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Issue 3382: Make '%F' and float.__format__('F') convert results to upper case.
This commit is contained in:
parent
4347c44f18
commit
454816d8bd
8 changed files with 53 additions and 23 deletions
|
|
@ -88,6 +88,18 @@ class FormatTest(unittest.TestCase):
|
|||
testboth("%#.*F", (110, -1.e+100/3.))
|
||||
overflowrequired = 0
|
||||
|
||||
# check for %f and %F
|
||||
testboth("%f", (1.0,), "1.000000")
|
||||
testboth("%F", (1.0,), "1.000000")
|
||||
testboth("%f", (1e100,), "1e+100")
|
||||
testboth("%F", (1e100,), "1E+100")
|
||||
testboth("%f", (1e100,), "1e+100")
|
||||
testboth("%F", (1e100,), "1E+100")
|
||||
testboth("%f", (float('nan'),), "nan")
|
||||
testboth("%F", (float('nan'),), "NAN")
|
||||
testboth("%f", (float('inf'),), "inf")
|
||||
testboth("%F", (float('inf'),), "INF")
|
||||
|
||||
# Formatting of long integers. Overflow is not ok
|
||||
overflowok = 0
|
||||
testboth("%x", 10L, "a")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue