diff options
author | Eric Smith <eric@trueblade.com> | 2010-02-22 19:26:06 (GMT) |
---|---|---|
committer | Eric Smith <eric@trueblade.com> | 2010-02-22 19:26:06 (GMT) |
commit | 903fc0596297f9326c754008e20ec81fe6c2a786 (patch) | |
tree | 36a94b0f38bd36c9e59d964af5280956a67b18e6 /Lib/test/test_complex.py | |
parent | 3b63c3d0590e33d7962398ae1fa8b54687f4c18d (diff) | |
download | cpython-903fc0596297f9326c754008e20ec81fe6c2a786.zip cpython-903fc0596297f9326c754008e20ec81fe6c2a786.tar.gz cpython-903fc0596297f9326c754008e20ec81fe6c2a786.tar.bz2 |
Merged revisions 78333 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r78333 | eric.smith | 2010-02-22 13:54:44 -0500 (Mon, 22 Feb 2010) | 9 lines
Merged revisions 78329 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78329 | eric.smith | 2010-02-22 13:33:47 -0500 (Mon, 22 Feb 2010) | 1 line
Issue #7988: Fix default alignment to be right aligned for complex.__format__. Now it matches other numeric types.
........
................
Diffstat (limited to 'Lib/test/test_complex.py')
-rw-r--r-- | Lib/test/test_complex.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_complex.py b/Lib/test/test_complex.py index faa7e1f..a84e949 100644 --- a/Lib/test/test_complex.py +++ b/Lib/test/test_complex.py @@ -491,6 +491,8 @@ class ComplexTest(unittest.TestCase): self.assertEqual(format(1.5+3j, '^20'), ' (1.5+3j) ') self.assertEqual(format(1.123-3.123j, '^20.2'), ' (1.1-3.1j) ') + self.assertEqual(format(1.5+3j, '20.2f'), ' 1.50+3.00j') + self.assertEqual(format(1.5+3j, '>20.2f'), ' 1.50+3.00j') self.assertEqual(format(1.5+3j, '<20.2f'), '1.50+3.00j ') self.assertEqual(format(1.5e20+3j, '<20.2f'), '150000000000000000000.00+3.00j') self.assertEqual(format(1.5e20+3j, '>40.2f'), ' 150000000000000000000.00+3.00j') |