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)
def test_encode(self): for enc, dec in self.TEST_CASES: encoded = basehangul.encode(enc) self.assertEqual(encoded, dec)
def test_empty(self): encoded = basehangul.encode('') self.assertEqual(encoded, '')