Example #1
0
  def test_create_duration_string_error(self):
    try:
      create_duration_string(None)
      assert False
    except:
      assert True 

    try:
      create_duration_string(-1)
      assert False
    except:
      assert True 
Example #2
0
 def test_create_duration_string(self):
   assert "00:00:00" == create_duration_string(0)
   assert "00:00:05" == create_duration_string(5)
   assert "00:01:00" == create_duration_string(60)
   assert "00:01:29" == create_duration_string(89)
   assert "01:00:00" == create_duration_string(3600)
   assert "01:00:05" == create_duration_string(3605)
   assert "120:00:05" == create_duration_string(432005)