diff options
author | Eric Smith <eric@trueblade.com> | 2009-04-22 16:20:47 (GMT) |
---|---|---|
committer | Eric Smith <eric@trueblade.com> | 2009-04-22 16:20:47 (GMT) |
commit | ebafbb705cbc92e7917e2dea423c141ec2b276b4 (patch) | |
tree | 8c9458e987733171a1ca9cfb485809687fbd64c6 /Lib | |
parent | 5533ff6a2ea1560cf6700c07096f34c5b9bf5874 (diff) | |
download | cpython-ebafbb705cbc92e7917e2dea423c141ec2b276b4.zip cpython-ebafbb705cbc92e7917e2dea423c141ec2b276b4.tar.gz cpython-ebafbb705cbc92e7917e2dea423c141ec2b276b4.tar.bz2 |
Fixed issue 5782: formatting with commas didn't work if no specifier type code was given.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_types.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py index 6fff22a..8e9dd72 100644 --- a/Lib/test/test_types.py +++ b/Lib/test/test_types.py @@ -405,6 +405,9 @@ class TypesTests(unittest.TestCase): test(123456, "#012X", '0X000001E240') test(-123456, "#012X", '-0X00001E240') + # issue 5782, commas with no specifier type + test(1234, '010,', '00,001,234') + # make sure these are errors # precision disallowed @@ -632,6 +635,9 @@ class TypesTests(unittest.TestCase): test(-1234.12341234, '013f', '-01234.123412') test(-123456.12341234, '011.2f', '-0123456.12') + # issue 5782, commas with no specifier type + test(1.2, '010,.2', '0,000,001.2') + # 0 padding with commas test(1234., '011,f', '1,234.000000') test(1234., '012,f', '1,234.000000') |