def test_guess_encoding_to_xml(self): tools.eq_(converters.guess_encoding_to_xml(self.u_entity), self.utf8_entity_escape) tools.eq_(converters.guess_encoding_to_xml(self.utf8_spanish), self.utf8_spanish) tools.eq_(converters.guess_encoding_to_xml(self.latin1_spanish), self.utf8_spanish) tools.eq_(converters.guess_encoding_to_xml(self.utf8_japanese), self.utf8_japanese)
def test_guess_encoding_to_xml_euc_japanese(self): if chardet: tools.eq_(converters.guess_encoding_to_xml(self.euc_jp_japanese), self.utf8_japanese) else: raise SkipTest( 'chardet not installed, euc_japanese won\'t be detected')
def test_guess_encoding_to_xml_euc_japanese_mangled(self): if chardet: raise SkipTest('chardet installed, euc_japanese won\'t be mangled') else: tools.eq_(converters.guess_encoding_to_xml(self.euc_jp_japanese), self.utf8_mangled_euc_jp_as_latin1)
def test_guess_encoding_to_xml_euc_japanese(self): if chardet: tools.eq_(converters.guess_encoding_to_xml(self.euc_jp_japanese), self.utf8_japanese) else: raise SkipTest('chardet not installed, euc_japanese won\'t be detected')