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

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

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_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_load_from.py   babelsubs(Download)
    def test_type_specified(self):
        subs = load_from_file(utils.get_data_file_path("simple.srt"), type='srt')
        parsed = subs.to_internal()
        self.assertEquals(len(parsed), 19)
 
    def test_type_guessing(self):
        subs = load_from_file(utils.get_data_file_path("simple.srt"))
    def test_type_override(self):
        subs = load_from_file(utils.get_data_file_path("simple-srt.badextension"), type='srt')
        parsed = subs.to_internal()
        self.assertEquals(len(parsed), 19)
 

src/b/a/babelsubs-HEAD/babelsubs/tests/test_dfxp.py   babelsubs(Download)
    def test_load_from_string(self):
        filename = utils.get_data_file_path('simple.dfxp')
        with open(filename) as f:
            s = f.read()
        load_from(s, type='dfxp').to_internal()