2009-09-29 04:29:01 +00:00
|
|
|
# encoding: utf8
|
|
|
|
|
|
|
|
import pokedex.roomaji
|
2011-05-02 07:20:28 +00:00
|
|
|
from pokedex.tests import positional_params
|
2009-09-29 04:29:01 +00:00
|
|
|
|
2011-05-02 07:20:28 +00:00
|
|
|
@positional_params(
|
2009-09-29 04:29:01 +00:00
|
|
|
(u'ヤミカラス', 'yamikarasu'),
|
|
|
|
|
|
|
|
# Elongated vowel
|
|
|
|
(u'イーブイ', 'iibui'),
|
|
|
|
(u'ホーホー', 'hoohoo'),
|
2011-01-26 01:14:42 +00:00
|
|
|
(u'ピカチュウ', u'pikachuu'),
|
2009-09-29 04:29:01 +00:00
|
|
|
|
|
|
|
# Combined characters
|
|
|
|
(u'ニャース', 'nyaasu'),
|
|
|
|
(u'ジャ', 'ja'),
|
|
|
|
(u'ぎゃくてん', 'gyakuten'),
|
2010-04-16 03:05:31 +00:00
|
|
|
(u'ウェザーボール', 'wezaabooru'),
|
2009-09-29 04:29:01 +00:00
|
|
|
|
|
|
|
# Special katakana combinations
|
|
|
|
(u'ラティアス', 'ratiasu'),
|
|
|
|
(u'ウィー', 'wii'),
|
2010-04-16 03:05:31 +00:00
|
|
|
(u'セレビィ', 'sereby'),
|
2011-05-02 07:20:28 +00:00
|
|
|
)
|
|
|
|
def test_roomaji(kana, roomaji):
|
|
|
|
result = pokedex.roomaji.romanize(kana)
|
|
|
|
assert result == roomaji
|
2009-09-29 04:29:01 +00:00
|
|
|
|
2011-01-26 01:14:42 +00:00
|
|
|
|
2011-05-02 07:20:28 +00:00
|
|
|
@positional_params(
|
2011-01-26 01:14:42 +00:00
|
|
|
(u'ヤミカラス', u'jamikarasu'),
|
|
|
|
|
|
|
|
# Elongated vowel
|
|
|
|
(u'イーブイ', u'íbui'),
|
|
|
|
(u'ホーホー', u'hóhó'),
|
|
|
|
(u'ピカチュウ', u'pikačú'),
|
|
|
|
|
|
|
|
# Combined characters
|
|
|
|
(u'ニャース', u'ňjásu'),
|
|
|
|
(u'ジャ', u'dža'),
|
|
|
|
(u'ぎゃくてん', u'gjakuten'),
|
|
|
|
(u'ウェザーボール', u'wezábóru'),
|
|
|
|
|
|
|
|
# Special katakana combinations
|
|
|
|
(u'ラティアス', u'ratiasu'),
|
|
|
|
(u'ウィー', u'wí'),
|
|
|
|
(u'セレビィ', u'serebí'),
|
2011-05-02 07:20:28 +00:00
|
|
|
)
|
|
|
|
def test_roomaji_cs(kana, roomaji):
|
|
|
|
result = pokedex.roomaji.romanize(kana, 'cs')
|
|
|
|
assert result == roomaji
|