Typo: multilang docstring was wrong
[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 (u'ピカチュウ', u'pikachuu'),
16
17 # Combined characters
18 (u'ニャース', 'nyaasu'),
19 (u'ジャ', 'ja'),
20 (u'ぎゃくてん', 'gyakuten'),
21 (u'ウェザーボール', 'wezaabooru'),
22
23 # Special katakana combinations
24 (u'ラティアス', 'ratiasu'),
25 (u'ウィー', 'wii'),
26 (u'セレビィ', 'sereby'),
27 ]
28
29 for kana, roomaji in tests:
30 result = pokedex.roomaji.romanize(kana)
31 assert_equal(result, roomaji, u"'%s' romanizes correctly" % roomaji)
32
33 def test_roomaji_cs():
34 tests = [
35 (u'ヤミカラス', u'jamikarasu'),
36
37 # Elongated vowel
38 (u'イーブイ', u'íbui'),
39 (u'ホーホー', u'hóhó'),
40 (u'ピカチュウ', u'pikačú'),
41
42 # Combined characters
43 (u'ニャース', u'ňjásu'),
44 (u'ジャ', u'dža'),
45 (u'ぎゃくてん', u'gjakuten'),
46 (u'ウェザーボール', u'wezábóru'),
47
48 # Special katakana combinations
49 (u'ラティアス', u'ratiasu'),
50 (u'ウィー', u'wí'),
51 (u'セレビィ', u'serebí'),
52 ]
53
54 for kana, roomaji in tests:
55 result = pokedex.roomaji.romanize(kana, 'cs')
56 assert_equal(result, roomaji, u"'%s' romanizes correctly for Czech" % roomaji)