How to use the pykakasi.K2H function in pykakasi

To help you get started, we’ve selected a few pykakasi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github miurahr / pykakasi / tests / basic_3.py View on Github external
def test_K2H(self):

        TESTS = [
            ("カンタン",   ("かんたん", 4)),
            ("ニャ",       ("にゃ",2)),
            ("ッキ",       ("っき",2)),
            ("ッファ",     ("っふぁ", 3)),
            ("シツモン",   ("しつもん",4)),
            ("チガイ",     ("ちがい",3)),
        ]

        h = pykakasi.K2H()
        for case, result in TESTS:
            self.assertEqual(h.convert(case), result)