Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(6) | Call(5) | Derive(0) | Import(1)
src/b/a/babelsubs-HEAD/babelsubs/tests/test_ssa.py babelsubs(Download)
from babelsubs import SubtitleParserError from babelsubs.tests import utils from babelsubs.generators.ssa import SSAGenerator from babelsubs.parsers.ssa import SSAParser from babelsubs import storage
def test_generate_centiseconds(self): sset = storage.SubtitleSet('en') sset.append_subtitle(133, 238,'hey') output = unicode(SSAGenerator(sset)) # make sure time is 230 milliseconds not 38 and that
self.assertEquals(underline.attrib['textDecoration'], 'underline') output = unicode(SSAGenerator(internal)) parsed2 = SSAParser(output, 'en') internal2 = parsed2.to_internal()
def test_timing_generator(self): sset = storage.SubtitleSet('en') sset.append_subtitle(40, 2930,"We started Universal Subtitles because we believe") generated = unicode(SSAGenerator(sset)) self.assertIn('Dialogue: 0,0:00:00.04,0:00:02.93,Default,,0000,0000,0000,,We started Universal Subtitles because we believe', generated)
def test_unsynced_generator(self): subs = storage.SubtitleSet('en') for x in xrange(0,5): subs.append_subtitle(None, None,"%s" % x) output = unicode(SSAGenerator(subs))