Esempio n. 1
0
 def test_multibyte(self):
     ITEMS = (
         ('가', u'가'),
         ('가나', u'가나'),
         ('가나다', u'가나다'),
         ('가나다라', u'가나다라'),
     )
     for asc, uni in ITEMS:
         encoded = basehangul.encode(asc)
         decoded = basehangul.decode(encoded)
         self.assertEqual(decoded, uni)
Esempio n. 2
0
 def test_encode(self):
     for enc, dec in self.TEST_CASES:
         encoded = basehangul.encode(enc)
         self.assertEqual(encoded, dec)
Esempio n. 3
0
 def test_empty(self):
     encoded = basehangul.encode('')
     self.assertEqual(encoded, '')