@@ -1500,6 +1500,26 @@ def test_format_timeframe(self):
15001500 assert self .locale ._format_timeframe ("years" , 12 ) == "12年"
15011501
15021502
1503+ @pytest .mark .usefixtures ("lang_locale" )
1504+ class TestChineseCNLocale :
1505+ def test_format_timeframe (self ):
1506+ assert self .locale ._format_timeframe ("now" , 0 ) == "刚才"
1507+ assert self .locale ._format_timeframe ("second" , 1 ) == "一秒"
1508+ assert self .locale ._format_timeframe ("seconds" , 30 ) == "30秒"
1509+ assert self .locale ._format_timeframe ("minute" , 1 ) == "1分钟"
1510+ assert self .locale ._format_timeframe ("minutes" , 40 ) == "40分钟"
1511+ assert self .locale ._format_timeframe ("hour" , 1 ) == "1小时"
1512+ assert self .locale ._format_timeframe ("hours" , 23 ) == "23小时"
1513+ assert self .locale ._format_timeframe ("day" , 1 ) == "1天"
1514+ assert self .locale ._format_timeframe ("days" , 12 ) == "12天"
1515+ assert self .locale ._format_timeframe ("week" , 1 ) == "一周"
1516+ assert self .locale ._format_timeframe ("weeks" , 38 ) == "38周"
1517+ assert self .locale ._format_timeframe ("month" , 1 ) == "1个月"
1518+ assert self .locale ._format_timeframe ("months" , 11 ) == "11个月"
1519+ assert self .locale ._format_timeframe ("year" , 1 ) == "1年"
1520+ assert self .locale ._format_timeframe ("years" , 12 ) == "12年"
1521+
1522+
15031523@pytest .mark .usefixtures ("lang_locale" )
15041524class TestSwahiliLocale :
15051525 def test_format_timeframe (self ):
0 commit comments