mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
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. ........
This commit is contained in:
parent
ac0b889e82
commit
4e260c5636
3 changed files with 46 additions and 11 deletions
|
@ -490,6 +490,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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue