def test_6digit_color_code_from_3digit_input(self): captions = SAMIReader().read(SAMPLE_SAMI.replace("#ffeedd", "#fed")) p_style = captions.get_style("p") self.assertEquals("#ffeedd", p_style[u'color'])
def test_6digit_color_code_from_6digit_input(self, sample_sami): captions = SAMIReader().read(sample_sami) p_style = captions.get_style("p") assert "#ffeedd" == p_style['color']
def test_6digit_color_code_from_3digit_input(self, sample_sami): sample_sami = deepcopy(sample_sami) captions = SAMIReader().read(sample_sami.replace("#ffeedd", "#fed")) p_style = captions.get_style("p") assert "#ffeedd" == p_style['color']
def test_6digit_color_code_from_6digit_input(self): captions = SAMIReader().read(SAMPLE_SAMI.decode(u'utf-8')) p_style = captions.get_style(u"p") self.assertEquals(u"#ffeedd", p_style[u'color'])
def test_6digit_color_code_from_3digit_input(self): captions = SAMIReader().read(SAMPLE_SAMI.replace("#ffeedd", "#fed")) p_style = captions.get_style("p") self.assertEquals("#ffeedd", p_style['color'])
def test_6digit_color_code_from_6digit_input(self): captions = SAMIReader().read(SAMPLE_SAMI) p_style = captions.get_style(u"p") self.assertEquals(u"#ffeedd", p_style[u'color'])
def test_6digit_color_code_from_3digit_input(self): captions = SAMIReader().read(SAMPLE_SAMI.decode(u"utf-8").replace(u"#ffeedd", u"#fed")) p_style = captions.get_style(u"p") self.assertEquals(u"#ffeedd", p_style[u"color"])
def test_6digit_color_code_from_6digit_input(self): captions = SAMIReader().read(SAMPLE_SAMI) p_style = captions.get_style("p") self.assertEqual("#ffeedd", p_style['color'])