diff options
author | Eric Smith <eric@trueblade.com> | 2008-07-17 17:48:39 (GMT) |
---|---|---|
committer | Eric Smith <eric@trueblade.com> | 2008-07-17 17:48:39 (GMT) |
commit | 454816d8bdd6ec9bb986aa31760518e622dc1ea7 (patch) | |
tree | 3ee9ce763f7c0545f625b9de580ca98722cb7080 /Lib/test/test_format.py | |
parent | 4347c44f1834887602402b7eec0e82214bd6bd1d (diff) | |
download | cpython-454816d8bdd6ec9bb986aa31760518e622dc1ea7.zip cpython-454816d8bdd6ec9bb986aa31760518e622dc1ea7.tar.gz cpython-454816d8bdd6ec9bb986aa31760518e622dc1ea7.tar.bz2 |
Issue 3382: Make '%F' and float.__format__('F') convert results to upper case.
Diffstat (limited to 'Lib/test/test_format.py')
-rw-r--r-- | Lib/test/test_format.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py index cd46bc2..1268670 100644 --- a/Lib/test/test_format.py +++ b/Lib/test/test_format.py @@ -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") |