def test_parse_time_empty(self): """Ensure parse_time returns correctly with None or empty string.""" expected = '' self.assertEqual(VideoDescriptor._parse_time(None), expected) self.assertEqual(VideoDescriptor._parse_time(''), expected)
def test_parse_time(self): """Ensure that times are parsed correctly into seconds.""" expected = 247 output = VideoDescriptor._parse_time('00:04:07') self.assertEqual(output, expected)
def test_parse_time_none(self): """Check parsing of None.""" output = VideoDescriptor._parse_time(None) self.assertEqual(output, '')
def test_parse_time_empty(self): """Check parsing of the empty string.""" output = VideoDescriptor._parse_time('') self.assertEqual(output, '')
def test_parse_time(self): """Ensure that times are parsed correctly into seconds.""" output = VideoDescriptor._parse_time('00:04:07') self.assertEqual(output, 247)
def test_parse_time_with_float(self): """Ensure that times are parsed correctly into seconds.""" expected = 247 output = VideoDescriptor._parse_time('247.0') self.assertEqual(output, expected)