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

This commit is contained in:
Ad Timmering 2021-11-26 20:40:25 +09:00 committed by Mariusz Felisiak
parent 28c98d4113
commit fe76944269
1 changed files with 4 additions and 0 deletions

View File

@ -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,
'', '.',
)
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', ',,.',
)
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,
'', '.',
)
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', ',,.',
)
with self.settings(USE_THOUSAND_SEPARATOR=False):
with translation.override('en'):