Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
 def test_parse_time_none(self):
     """Check parsing of None."""
     output = VideoDescriptor._parse_time(None)
     self.assertEqual(output, '')
Beispiel #4
0
 def test_parse_time_empty(self):
     """Check parsing of the empty string."""
     output = VideoDescriptor._parse_time('')
     self.assertEqual(output, '')
Beispiel #5
0
 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_empty(self):
     """Check parsing of the empty string."""
     output = VideoDescriptor._parse_time('')
     self.assertEqual(output, '')
 def test_parse_time_none(self):
     """Check parsing of None."""
     output = VideoDescriptor._parse_time(None)
     self.assertEqual(output, '')
Beispiel #8
0
 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)
Beispiel #9
0
 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)