summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_complex.py
diff options
context:
space:
mode:
authorEric Smith <eric@trueblade.com>2010-02-22 18:54:44 (GMT)
committerEric Smith <eric@trueblade.com>2010-02-22 18:54:44 (GMT)
commit4e260c5636d5dac66d72b869bb21b2010e278fc9 (patch)
tree024492e10b06464e82485b36f7b91d194e3ebbf3 /Lib/test/test_complex.py
parentac0b889e82e01740aaee788868afe7724cb141fd (diff)
downloadcpython-4e260c5636d5dac66d72b869bb21b2010e278fc9.zip
cpython-4e260c5636d5dac66d72b869bb21b2010e278fc9.tar.gz
cpython-4e260c5636d5dac66d72b869bb21b2010e278fc9.tar.bz2
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.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_complex.py b/Lib/test/test_complex.py
index a54e820..702227c 100644
--- a/Lib/test/test_complex.py
+++ b/Lib/test/test_complex.py
@@ -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')