Merged revisions 65069 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r65069 | eric.smith | 2008-07-17 13:48:39 -0400 (Thu, 17 Jul 2008) | 1 line

  Issue 3382: Make '%F' and float.__format__('F') convert results to upper case.
........
This commit is contained in:
Eric Smith 2008-07-17 18:30:48 +00:00
parent ddc5669fd9
commit a4fac36eb3
7 changed files with 44 additions and 18 deletions

View file

@ -79,6 +79,17 @@ class FormatTest(unittest.TestCase):
testformat("%#.*f", (110, -1.e+100/3.))
testformat("%#.*F", (110, -1.e+100/3.))
overflowrequired = 0
# check for %f and %F
testformat("%f", (1.0,), "1.000000")
testformat("%F", (1.0,), "1.000000")
testformat("%f", (1e100,), "1e+100")
testformat("%F", (1e100,), "1E+100")
testformat("%f", (1e100,), "1e+100")
testformat("%F", (1e100,), "1E+100")
testformat("%f", (float('nan'),), "nan")
testformat("%F", (float('nan'),), "NAN")
testformat("%f", (float('inf'),), "inf")
testformat("%F", (float('inf'),), "INF")
# Formatting of integers. Overflow is not ok
overflowok = 0
testformat("%x", 10, "a")