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.tests import utils
from babelsubs.generators.ssa import SSAGenerator
from babelsubs.parsers.ssa import SSAParser
from babelsubs import storage
 
    def test_self_generate(self):
        parsed_subs1 = utils.get_subs("simple.ssa")
        generated = SSAParser(unicode(parsed_subs1), 'en')
 
        for x1, x2 in zip([x for x in  parsed_subs1.to_internal()], [x for x in generated.to_internal()]):
Dialogue: 0,0:00:00.04,0:00:02.93,Default,,0000,0000,0000,,We\n started {\\b1}Universal Subtitles{\\b0} {\i1}because{\i0} we {\u1}believe{\u0}
"""
        parsed = SSAParser(subs, 'en')
        internal = parsed.to_internal()
 
 
        output = unicode(SSAGenerator(internal))
        parsed2 = SSAParser(output, 'en')
        internal2 = parsed2.to_internal()
 
        output = unicode(SSAGenerator(subs))
 
        parsed = SSAParser(output,'en')
        internal = parsed.to_internal()
        subs = [x for x in internal.subtitle_items()]