예제 #1
0
 def test_extra_trailing_empty_line(self):
     captions = SRTReader().read(SAMPLE_SRT_TRAILING_BLANKS)
     self.assertEqual(2, len(captions.get_captions("en-US")))
예제 #2
0
    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)
예제 #3
0
 def test_numeric_captions(self):
     captions = SRTReader().read(SAMPLE_SRT_NUMERIC)
     self.assertEqual(7, len(captions.get_captions("en-US")))
예제 #4
0
    def test_caption_length(self):
        captions = SRTReader().read(SAMPLE_SRT)

        self.assertEqual(7, len(captions.get_captions("en-US")))