Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(0) | Call(0) | Derive(0) | Import(0)
src/b/a/babelsubs-HEAD/babelsubs/tests/test_webvtt.py babelsubs(Download)
def setUp(self): self.dfxp = utils.get_subs("with-formatting.dfxp").to_internal() self.subs = self.dfxp.subtitle_items(mappings=WEBVTTGenerator.MAPPINGS) def test_generated_formatting(self):
self.assertEquals(len(subs1), len(subs2)) for x1, x2 in zip([x for x in parsed1.subtitle_items(WEBVTTGenerator.MAPPINGS)], \ [x for x in parsed2.subtitle_items(WEBVTTGenerator.MAPPINGS)]): self.assertEquals(x1, x2)
def test_ampersand_escaping(self): subs = utils.get_subs("basic.vtt") parsed = subs.to_internal() sub_data = [x for x in parsed.subtitle_items(WEBVTTGenerator.MAPPINGS)] self.assertEquals(sub_data[16].text, "such as MP4, theora, webM and <i>&</i> HTML 5.")
def setUp(self): self.dfxp = utils.get_subs("with-formatting.dfxp").to_internal() self.subs = self.dfxp.subtitle_items(mappings=WEBVTTGenerator.MAPPINGS) def test_generated_formatting(self):