コード例 #1
0
 def test_normalize_utf8_unicodestring(self):
     # this is a UNICODE string consisting of the characters supported by unicode
     teststring_normal = unicode(
         """!@#$%^&*()_+-=QWERTYqwerty<>,.:";'?/{}[]|\\""")
     resstring = xml_util.normalize_utf8(teststring_normal)
     self.assertTrue(teststring_normal == resstring, \
         "{0}\nshould be\n{1}".format(resstring, teststring_normal))
コード例 #2
0
 def test_normalize_utf8_withaccents(self):
     teststring = accent_file
     resstring = xml_util.normalize_utf8(teststring)
     self.assertTrue(teststring.decode('utf-8') == resstring, resstring)
コード例 #3
0
ファイル: test_xml_util.py プロジェクト: namunu/MBS_Patent
 def test_normalize_utf8_withaccents(self):
     teststring = accent_file
     resstring = xml_util.normalize_utf8(teststring)
     self.assertTrue(teststring.decode("utf-8") == resstring, resstring)
コード例 #4
0
ファイル: test_xml_util.py プロジェクト: namunu/MBS_Patent
 def test_normalize_utf8_unicodestring(self):
     # this is a UNICODE string consisting of the characters supported by unicode
     teststring_normal = unicode("""!@#$%^&*()_+-=QWERTYqwerty<>,.:";'?/{}[]|\\""")
     resstring = xml_util.normalize_utf8(teststring_normal)
     self.assertTrue(teststring_normal == resstring, "{0}\nshould be\n{1}".format(resstring, teststring_normal))