diff options
| author | Karen Tracey <kmtracey@gmail.com> | 2011-09-09 17:57:45 +0000 |
|---|---|---|
| committer | Karen Tracey <kmtracey@gmail.com> | 2011-09-09 17:57:45 +0000 |
| commit | 64e16c094b3b4f551798f3dbff496fe5c6798f3b (patch) | |
| tree | 1e7063e3ad1adaf957f23e65942b2a1765eb7672 | |
| parent | dc3b2a0fdf2a69864c5508a9c49aca43acac9bb2 (diff) | |
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
| -rw-r--r-- | tests/regressiontests/humanize/tests.py | 11 |
1 files changed, 11 insertions, 0 deletions
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', |
