Added hiragana support to roomaji.py. #100
[zzz-pokedex.git] / pokedex / tests / test_roomaji.py
1 # encoding: utf8
2 from nose.tools import *
3 import unittest
4
5 import pokedex.roomaji
6
7
8 def test_roomaji():
9 tests = [
10 (u'ヤミカラス', 'yamikarasu'),
11
12 # Elongated vowel
13 (u'イーブイ', 'iibui'),
14 (u'ホーホー', 'hoohoo'),
15
16 # Combined characters
17 (u'ニャース', 'nyaasu'),
18 (u'ジャ', 'ja'),
19 (u'ぎゃくてん', 'gyakuten'),
20
21 # Special katakana combinations
22 (u'ラティアス', 'ratiasu'),
23 (u'ウィー', 'wii'),
24 ]
25
26 for kana, roomaji in tests:
27 result = pokedex.roomaji.romanize(kana)
28 assert_equal(result, roomaji, u"'%s' romanizes correctly" % roomaji)