Code

Ticket #3017: humanize.diff

File humanize.diff, 894 bytes (added by russellm, 7 years ago)

unit test for humanize.intcomma

Line 
1Index: tests/regressiontests/humanize/tests.py
2===================================================================
3--- tests/regressiontests/humanize/tests.py     (revision 4843)
4+++ tests/regressiontests/humanize/tests.py     (working copy)
5@@ -27,8 +27,10 @@
6         self.humanize_tester(test_list, result_list, 'ordinal')
7 
8     def test_intcomma(self):
9-        test_list = ('100','1000','10123','10311','1000000')
10-        result_list = ('100', '1,000', '10,123', '10,311', '1,000,000')
11+        test_list = (100, 1000, 10123, 10311, 1000000, 1234567.1234567,
12+                     '100','1000','10123','10311','1000000','1234567.1234567')
13+        result_list = ('100', '1,000', '10,123', '10,311', '1,000,000','1,234,567.1234567',
14+                       '100', '1,000', '10,123', '10,311', '1,000,000','1,234,567.1234567')
15 
16         self.humanize_tester(test_list, result_list, 'intcomma')
17