]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Add a unit test for locale.friendly_number
authorLee Kyoung chan <leekchan@gmail.com>
Tue, 23 Sep 2014 10:35:13 +0000 (19:35 +0900)
committerLee Kyoung chan <leekchan@gmail.com>
Tue, 23 Sep 2014 10:35:13 +0000 (19:35 +0900)
tornado/test/locale_test.py

index b28f37d1ba146605f4bf3b366c2c3250917d6a76..30668114889bccc3f3d477816e693c5640a54fef 100644 (file)
@@ -80,3 +80,7 @@ class EnglishTest(unittest.TestCase):
         date = now - datetime.timedelta(days=500)
         self.assertEqual(locale.format_date(date, full_format=False, shorter=True),
                          '%s %d, %d' % (locale._months[date.month - 1], date.day, date.year))
+
+    def test_friendly_number(self):
+        locale = tornado.locale.get('en_US')
+        self.assertEqual(locale.friendly_number(1000000), '1,000,000')