Exemple #1
0
 def test_build_utf8(self):
     s = String("foo", 12, encoding="utf8")
     self.assertEqual(s.build(u("hello joh\u0503n")), b"hello joh\xd4\x83n")
Exemple #2
0
 def test_parse_utf8(self):
     s = String("foo", 12, encoding="utf8")
     self.assertEqual(s.parse(b"hello joh\xd4\x83n"), u("hello joh\u0503n"))