Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(3) | Call(2) | Derive(0) | Import(1)
src/b/a/babelsubs-HEAD/babelsubs/tests/test_webvtt.py babelsubs(Download)
from babelsubs.generators.webvtt import WEBVTTGenerator from babelsubs.parsers import SubtitleParserError from babelsubs.parsers.webvtt import WEBVTTParser from babelsubs.tests import utils
def test_round_trip(self): subs1 = utils.get_subs("basic.vtt") parsed1 = subs1.to_internal() srt_ouput = unicode(WEBVTTGenerator(parsed1)) subs2 = WEBVTTParser(srt_ouput, 'en')
def test_invalid(self): with self.assertRaises(SubtitleParserError): WEBVTTParser ("this\n\nisnot a valid subs format","en") def test_mixed_newlines(self):