Example #1
0
 def test_year(s):
     s.assertEquals(f_t_l(31536000), _("1 year"))
Example #2
0
 def test_seconds_dropped(s):
     s.assertEquals(len(f_t_l(3601).split(", ")), 2)
Example #3
0
 def test_days(s):
     s.assertEquals(f_t_l(172800).split(", ")[0], _("%d days") % 2)
Example #4
0
 def test_nothours(s):
     s.assertEquals(f_t_l(3599).split(", ")[0], _("%d minutes") % 59)
Example #5
0
 def test_hours(s):
     s.assertEquals(f_t_l(7200), _("%d hours") % 2)
Example #6
0
 def test_notminutes(s):
     s.assertEquals(f_t_l(59).split(", ")[0], _("%d seconds") % 59)
Example #7
0
 def test_minute(s):
     s.assertEquals(f_t_l(60), _("1 minute"))
Example #8
0
 def test_notdays(s):
     s.assertEquals(f_t_l(86399).split(", ")[0], _("%d hours") % 23)
Example #9
0
 def test_seconds_dropped(s):
     s.assertEquals(len(f_t_l(3601).split(", ")), 2)
Example #10
0
 def test_hour(s):
     s.assertEquals(f_t_l(3600), _("1 hour"))
Example #11
0
 def test_hours(s):
     s.assertEquals(f_t_l(7200), _("%d hours") % 2)
Example #12
0
 def test_nothours(s):
     s.assertEquals(f_t_l(3599).split(", ")[0], _("%d minutes") % 59)
Example #13
0
 def test_minutes(s):
     s.assertEquals(f_t_l(120).split(", ")[0], _("%d minutes") % 2)
Example #14
0
 def test_minute(s):
     s.assertEquals(f_t_l(60), _("1 minute"))
Example #15
0
 def test_drop_zero(s):
     s.assertEquals(f_t_l(3601), ", ".join([_("1 hour"), _("1 second")]))
Example #16
0
 def test_day(s):
     s.assertEquals(f_t_l(86400), _("1 day"))
Example #17
0
 def test_limit(s):
     s.assertEquals(len(f_t_l(2 ** 31).split(", ")), 2)
Example #18
0
 def test_days(s):
     s.assertEquals(f_t_l(172800).split(", ")[0], _("%d days") % 2)
Example #19
0
 def test_notminutes(s):
     s.assertEquals(f_t_l(59).split(", ")[0], _("%d seconds") % 59)
Example #20
0
 def test_notyears(s):
     s.assertEquals(f_t_l(31535999).split(", ")[0], _("%d days") % 364)
Example #21
0
 def test_minutes(s):
     s.assertEquals(f_t_l(120).split(", ")[0], _("%d minutes") % 2)
Example #22
0
 def test_year(s):
     s.assertEquals(f_t_l(31536000), _("1 year"))
Example #23
0
 def test_hour(s):
     s.assertEquals(f_t_l(3600), _("1 hour"))
Example #24
0
 def test_years(s):
     s.assertEquals(f_t_l(63072000).split(", ")[0], _("%d years") % 2)
Example #25
0
 def test_notdays(s):
     s.assertEquals(f_t_l(86399).split(", ")[0], _("%d hours") % 23)
Example #26
0
 def test_drop_zero(s):
     s.assertEquals(f_t_l(3601), ", ".join([_("1 hour"), _("1 second")]))
Example #27
0
 def test_day(s):
     s.assertEquals(f_t_l(86400), _("1 day"))
Example #28
0
 def test_limit_zero(s):
     s.assertEquals(f_t_l(1, limit=0), _("1 second"))
Example #29
0
 def test_notyears(s):
     s.assertEquals(f_t_l(31535999).split(", ")[0], _("%d days") % 364)
Example #30
0
 def test_limit(s):
     s.assertEquals(len(f_t_l(2**31).split(", ")), 2)
Example #31
0
 def test_years(s):
     s.assertEquals(f_t_l(63072000).split(", ")[0], _("%d years") % 2)
Example #32
0
 def test_second(s):
     s.assertEquals(f_t_l(1).split(", ")[0], _("1 second"))
Example #33
0
 def test_limit_zero(s):
     s.assertEquals(f_t_l(1, limit=0), _("1 second"))
Example #34
0
 def test_seconds(s):
     s.assertEquals(f_t_l(2).split(", ")[0], _("%d seconds") % 2)
Example #35
0
 def test_second(s):
     s.assertEquals(f_t_l(1).split(", ")[0], _("1 second"))
Example #36
0
 def test_seconds(s):
     s.assertEquals(f_t_l(2).split(", ")[0], _("%d seconds") % 2)