Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(5)  |  Derive(0)  |  Import(3)

src/b/a/babelsubs-HEAD/babelsubs/tests/test_storage.py   babelsubs(Download)
from unittest2 import TestCase
 
from babelsubs import storage
from babelsubs.generators.html import HTMLGenerator
from babelsubs.generators.srt import SRTGenerator

src/b/a/babelsubs-HEAD/babelsubs/tests/test_srt.py   babelsubs(Download)
from unittest2 import TestCase
 
from lxml import etree
from babelsubs.storage import get_contents, SubtitleSet, TTS_NAMESPACE_URI
from babelsubs.generators.srt import SRTGenerator
    def test_round_trip(self):
        subs1  = utils.get_subs("simple.srt")
        parsed1 = subs1.to_internal()
        srt_ouput = unicode(SRTGenerator(parsed1))
        subs2  = SRTParser(srt_ouput, 'en')
        self.assertEquals(underline.attrib['{%s}textDecoration' % TTS_NAMESPACE_URI], 'underline')
 
        output = unicode(SRTGenerator(internal))
        parsed2 = SRTParser(output, 'en')
        internal2 = parsed2.to_internal()
        self.assertEquals(element.getchildren()[1].tail, ' >> Hello, and welcome.')
 
        output = unicode(SRTGenerator(internal))
        parsed2 = SRTParser(output, 'en')
        internal2 = parsed2.to_internal()
    def test_unsynced_generator(self):
        subs = SubtitleSet('en')
        for x in xrange(0,5):
            subs.append_subtitle(None, None,"%s" % x)
        output = unicode(SRTGenerator(subs))

src/b/a/babelsubs-HEAD/babelsubs/tests/test_dfxp.py   babelsubs(Download)
from babelsubs.parsers.dfxp import DFXPParser
from babelsubs.generators.dfxp import DFXPGenerator
from babelsubs.generators.srt import SRTGenerator
from babelsubs.parsers.base import SubtitleParserError
from babelsubs.storage import  (