Add a test for the intcomma regression described in #16404/#16562, fixed in r16726. Refs #16404.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16736 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Karen Tracey 2011-09-09 17:57:45 +00:00
parent dc3b2a0fdf
commit 64e16c094b
1 changed files with 11 additions and 0 deletions

View File

@ -41,6 +41,17 @@ class HumanizeTests(TestCase):
self.humanize_tester(test_list, result_list, 'intcomma')
def test_l10n_intcomma(self):
test_list = (100, 1000, 10123, 10311, 1000000, 1234567.25,
'100', '1000', '10123', '10311', '1000000', '1234567.1234567',
None)
result_list = ('100', '1,000', '10,123', '10,311', '1,000,000', '1,234,567.25',
'100', '1,000', '10,123', '10,311', '1,000,000', '1,234,567.1234567',
None)
with self.settings(USE_L10N=True, USE_THOUSAND_SEPARATOR=False):
self.humanize_tester(test_list, result_list, 'intcomma')
def test_intword(self):
test_list = ('100', '1000000', '1200000', '1290000',
'1000000000', '2000000000', '6000000000000',