Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_J2a_kunrei(self):
TESTS = [
("構成", ("kousei",2)),
("好き", ("suki",2)),
("大きい", ("ookii",3)),
("日本国民は、", ("nihonkokumin", 4)),
("漢字", ("kanzi",2))
]
j = pykakasi.J2a(method="Kunrei")
for case, result in TESTS:
self.assertEqual(j.convert(case), result)
def test_J2a(self):
TESTS = [
("構成", ("kousei",2)),
("好き", ("suki",2)),
("大きい", ("ookii",3)),
("日本国民は、", ("nihonkokumin", 4))
]
j = pykakasi.J2a()
for case, result in TESTS:
self.assertEqual(j.convert(case), result)
def test_J2a_passport(self):
TESTS = [
("構成", ("kosei",2)),
("好き", ("suki",2)),
("大きい", ("okii",3)),
("日本国民は、", ("nihonkokumin", 4)),
("漢字", ("kanji", 2)),
("佐藤", ("sato", 2)),
("難波", ("namba",2))
]
j = pykakasi.J2a(method="Passport")
for case, result in TESTS:
self.assertEqual(j.convert(case), result)