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