summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_decimal.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-03-17 18:10:15 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-03-17 18:10:15 (GMT)
commitad41634313b291298935ff1b7044fc95d86da2be (patch)
tree3c4b8b0f7a473e68cc4c46b98b4cb71ff3dc3a2e /Lib/test/test_decimal.py
parent44c5481941fb9595c23d796b09dd9c34e0357fa5 (diff)
downloadcpython-ad41634313b291298935ff1b7044fc95d86da2be.zip
cpython-ad41634313b291298935ff1b7044fc95d86da2be.tar.gz
cpython-ad41634313b291298935ff1b7044fc95d86da2be.tar.bz2
Merged revisions 70430 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r70430 | mark.dickinson | 2009-03-17 18:01:03 +0000 (Tue, 17 Mar 2009) | 3 lines Fix bug in Decimal __format__ method that swapped left and right alignment. ........
Diffstat (limited to 'Lib/test/test_decimal.py')
-rw-r--r--Lib/test/test_decimal.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index f40de8f..eaf9f0b 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -693,6 +693,12 @@ class DecimalFormatTest(unittest.TestCase):
('.0g', '-sNaN', '-sNaN'),
('', '1.00', '1.00'),
+
+ # check alignment
+ ('<6', '123', '123 '),
+ ('>6', '123', ' 123'),
+ ('^6', '123', ' 123 '),
+ ('=+6', '123', '+ 123'),
]
for fmt, d, result in test_values:
self.assertEqual(format(Decimal(d), fmt), result)