From 64e16c094b3b4f551798f3dbff496fe5c6798f3b Mon Sep 17 00:00:00 2001 From: Karen Tracey Date: Fri, 9 Sep 2011 17:57:45 +0000 Subject: [PATCH] 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 --- tests/regressiontests/humanize/tests.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/regressiontests/humanize/tests.py b/tests/regressiontests/humanize/tests.py index 370575a84a..ee80910df0 100644 --- a/tests/regressiontests/humanize/tests.py +++ b/tests/regressiontests/humanize/tests.py @@ -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',