diff options
| author | Jannis Leidel <jannis@leidel.info> | 2011-04-22 12:03:10 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2011-04-22 12:03:10 +0000 |
| commit | 01d0bf011ef9c92892fa0717764d74ecfd2ef2b6 (patch) | |
| tree | 571a48ca2e6ce20a0c295815173c8b5f585e6c8e /tests | |
| parent | 0e9692bc66ed7cfbbcb4c8031b36e82751685238 (diff) | |
Fixed #13810 -- Truncate numbers correctly when given number of decimal positions is zero. Thanks, milosu and Łukasz Rekucki.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16074 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/i18n/tests.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/regressiontests/i18n/tests.py b/tests/regressiontests/i18n/tests.py index c92823b9c7..2a7f0c2841 100644 --- a/tests/regressiontests/i18n/tests.py +++ b/tests/regressiontests/i18n/tests.py @@ -171,6 +171,7 @@ class FormattingTests(TestCase): settings.USE_THOUSAND_SEPARATOR = False self.assertEqual(u'66666.66', nformat(self.n, decimal_sep='.', decimal_pos=2, grouping=3, thousand_sep=',')) self.assertEqual(u'66666A6', nformat(self.n, decimal_sep='A', decimal_pos=1, grouping=1, thousand_sep='B')) + self.assertEqual(u'66666', nformat(self.n, decimal_sep='X', decimal_pos=0, grouping=1, thousand_sep='Y')) settings.USE_THOUSAND_SEPARATOR = True self.assertEqual(u'66,666.66', nformat(self.n, decimal_sep='.', decimal_pos=2, grouping=3, thousand_sep=',')) |
