def test_extra_trailing_empty_line(self): captions = SRTReader().read(SAMPLE_SRT_TRAILING_BLANKS) self.assertEqual(2, len(captions.get_captions("en-US")))
def test_proper_timestamps(self): captions = SRTReader().read(SAMPLE_SRT) paragraph = captions.get_captions("en-US")[2] self.assertEqual(17000000, paragraph.start) self.assertEqual(18752000, paragraph.end)
def test_numeric_captions(self): captions = SRTReader().read(SAMPLE_SRT_NUMERIC) self.assertEqual(7, len(captions.get_captions("en-US")))
def test_caption_length(self): captions = SRTReader().read(SAMPLE_SRT) self.assertEqual(7, len(captions.get_captions("en-US")))