diff options
author | Eric Smith <eric@trueblade.com> | 2010-02-22 18:33:47 +0000 |
---|---|---|
committer | Eric Smith <eric@trueblade.com> | 2010-02-22 18:33:47 +0000 |
commit | f32d4aceada4d220af21755ebfa6a81c389fbb9d (patch) | |
tree | 760a80ac7f915d8caf78f2bc0d1efe0ade36a2f8 /Lib/test/test_complex.py | |
parent | 8f48f4c5f6372f4778c04f3246370ecb6caa991f (diff) | |
download | cpython-git-f32d4aceada4d220af21755ebfa6a81c389fbb9d.tar.gz |
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 2cf9a9e15d..eb04856cc5 100644 --- a/Lib/test/test_complex.py +++ b/Lib/test/test_complex.py @@ -568,6 +568,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') |