diff options
Diffstat (limited to 'test/test_youtube_subtitles.py')
-rw-r--r-- | test/test_youtube_subtitles.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/test_youtube_subtitles.py b/test/test_youtube_subtitles.py index 3b5a53fca..94adc4555 100644 --- a/test/test_youtube_subtitles.py +++ b/test/test_youtube_subtitles.py @@ -42,7 +42,7 @@ class TestYoutubeSubtitles(unittest.TestCase): DL = FakeDownloader() DL.params['allsubtitles'] = False DL.params['writesubtitles'] = False - + DL.params['subtitlesformat'] = 'srt' def test_youtube_no_subtitles(self): DL = FakeDownloader() DL.params['writesubtitles'] = False @@ -80,6 +80,14 @@ class TestYoutubeSubtitles(unittest.TestCase): info_dict = IE.extract('QRS8MkLhQmM') subtitles = info_dict[0]['subtitles'] self.assertEqual(len(subtitles), 12) + def test_youtube_subtitles_format(self): + DL = FakeDownloader() + DL.params['writesubtitles'] = True + DL.params['subtitlesformat'] = 'sbv' + IE = YoutubeIE(DL) + info_dict = IE.extract('QRS8MkLhQmM') + sub = info_dict[0]['subtitles'][0] + self.assertEqual(md5(sub[2]), '13aeaa0c245a8bed9a451cb643e3ad8b') if __name__ == '__main__': unittest.main() |