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

All Samples(7)  |  Call(6)  |  Derive(0)  |  Import(1)

src/b/a/babelsubs-HEAD/babelsubs/tests/test_webvtt.py   babelsubs(Download)
    def test_timed_data_parses_correctly(self):
        subs = utils.get_data_file_path('timed_text.vtt')
        parsed = babelsubs.load_from_file(subs, type='vtt', language='en')
 
        self.assertNotEquals(parsed, None)

src/b/a/babelsubs-HEAD/babelsubs/tests/test_srt.py   babelsubs(Download)
    def test_timed_data_parses_correctly(self):
        subs = utils.get_data_file_path('timed_text.srt')
        parsed = babelsubs.load_from_file(subs, type='srt', language='en')
 
        self.assertNotEquals(parsed, None)

src/b/a/babelsubs-HEAD/babelsubs/tests/test_load_from.py   babelsubs(Download)
from unittest2 import TestCase
from babelsubs import load_from, load_from_file
from babelsubs.tests import utils
 
 
class LoadFromTest(TestCase):
    def test_type_specified(self):
        subs = load_from_file(utils.get_data_file_path("simple.srt"), type='srt')
    def test_type_guessing(self):
        subs = load_from_file(utils.get_data_file_path("simple.srt"))
        parsed = subs.to_internal()
        self.assertEquals(len(parsed), 19)
 
    def test_type_override(self):
        subs = load_from_file(utils.get_data_file_path("simple-srt.badextension"), type='srt')

src/b/a/babelsubs-HEAD/babelsubs/tests/utils.py   babelsubs(Download)
def get_subs(file_name,language='en'):
    return babelsubs.load_from_file(get_data_file_path(file_name), language=language)