Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a test for the intcomma regression described in #16404/#16562, fi…

…xed in r16726. Refs #16404.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16736 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 64e16c094b3b4f551798f3dbff496fe5c6798f3b 1 parent dc3b2a0
@kmtracey kmtracey authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 tests/regressiontests/humanize/tests.py
View
11 tests/regressiontests/humanize/tests.py
@@ -41,6 +41,17 @@ def test_intcomma(self):
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',
Please sign in to comment.
Something went wrong with that request. Please try again.