Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_complex.py @ 59028:73cd83706bc4 3.1
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.
........
................
| author | Eric Smith <eric@trueblade.com> |
|---|---|
| date | Mon, 22 Feb 2010 19:26:06 +0000 |
| parents | 0bb232078b8c |
| children | e6f1b3d1040a |
line wrap: on
line diff
--- a/Lib/test/test_complex.py Mon Feb 22 17:19:17 2010 +0000 +++ b/Lib/test/test_complex.py Mon Feb 22 19:26:06 2010 +0000 @@ -491,6 +491,8 @@ 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')
