瀏覽代碼

Refs #28628 -- Added tests for intcomma with non-ASCII digits.

Ad Timmering 3 年之前
父節點
當前提交
fe76944269
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      tests/humanize_tests/tests.py

+ 4 - 0
tests/humanize_tests/tests.py

@@ -69,11 +69,13 @@ class HumanizeTests(SimpleTestCase):
             100, 1000, 10123, 10311, 1000000, 1234567.25, '100', '1000',
             '10123', '10311', '1000000', '1234567.1234567',
             Decimal('1234567.1234567'), None,
+            '1234567', '1234567.12',
         )
         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',
             '1,234,567.1234567', None,
+            '1,234,567', '1,234,567.12',
         )
         with translation.override('en'):
             self.humanize_tester(test_list, result_list, 'intcomma')
@@ -83,11 +85,13 @@ class HumanizeTests(SimpleTestCase):
             100, 1000, 10123, 10311, 1000000, 1234567.25, '100', '1000',
             '10123', '10311', '1000000', '1234567.1234567',
             Decimal('1234567.1234567'), None,
+            '1234567', '1234567.12',
         )
         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',
             '1,234,567.1234567', None,
+            '1,234,567', '1,234,567.12',
         )
         with self.settings(USE_THOUSAND_SEPARATOR=False):
             with translation.override('en'):