Exemplo n.º 1
0
 def test_hours(self):
     assert "01:00:00" == duration('3600')
     assert "01:00:02" == duration('3602')
     assert "02:00:00" == duration('7200')
     assert "02:02:00" == duration('7320')
     assert "02:02:01" == duration('7321')
     assert "02:02:02" == duration('7322')
Exemplo n.º 2
0
 def test_hours(self):
     eq_("01:00:00", duration('3600'))
     eq_("01:00:02", duration('3602'))
     eq_("02:00:00", duration('7200'))
     eq_("02:02:00", duration('7320'))
     eq_("02:02:01", duration('7321'))
     eq_("02:02:02", duration('7322'))
Exemplo n.º 3
0
 def test_bad(self):
     eq_('', duration(None))
Exemplo n.º 4
0
 def test_minutes(self):
     eq_("01:01", duration('61'))
     eq_("01:00", duration('60'))
     eq_("02:00", duration('120'))
Exemplo n.º 5
0
 def test_seconds(self):
     eq_("00:15", duration('15'))
     eq_("00:01", duration('1'))
Exemplo n.º 6
0
 def test_bad(self):
     assert '' == duration(None)
Exemplo n.º 7
0
 def test_minutes(self):
     assert "01:01" == duration('61')
     assert "01:00" == duration('60')
     assert "02:00" == duration('120')
Exemplo n.º 8
0
 def test_seconds(self):
     assert "00:15" == duration('15')
     assert "00:01" == duration('1')