Package cjklib :: Module test :: Class GRTestCase
[hide private]
[frames] | no frames]

Class GRTestCase

source code


Tests GR conversion methods.

Nested Classes [hide private]

Inherited from unittest.TestCase: failureException

Instance Methods [hide private]
 
setUp(self)
Hook method for setting up the test fixture before exercising it.
source code
 
testGRJunctionGeneralFinalTable(self)
Test if the conversion matches the general final table given by GR Junction.
source code
 
testGRJunctionMNLRFinalTable(self)
Test if the conversion matches the m,n,l,r final table given by GR Junction.
source code
 
testGRJunctionSpecialTable(self)
Test if the conversion matches the special syllable table given by GR Junction.
source code

Inherited from unittest.TestCase: __call__, __init__, __repr__, __str__, assertAlmostEqual, assertAlmostEquals, assertEqual, assertEquals, assertFalse, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertRaises, assertTrue, assert_, countTestCases, debug, defaultTestResult, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, shortDescription, tearDown

Inherited from unittest.TestCase (private): _exc_info

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Class Variables [hide private]
  SPECIAL_MAPPING = '\nzhi jy jyr jyy j...
  FINAL_MAPPING = '\na a ar aa ah ...
  PINYIN_FINAL_MAPPING = {'iu': 'iou', 'iur': 'iour', 'u:': u'ü'...
  INITIAL_REGEX = re.compile(r'^(tz|ts|ch|sh|[bpmfdtnlsjrgkh])?')
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setUp(self)

source code 

Hook method for setting up the test fixture before exercising it.

Overrides: unittest.TestCase.setUp
(inherited documentation)

Class Variable Details [hide private]

SPECIAL_MAPPING

Value:
'''
zhi             jy      jyr     jyy     jyh
chi             chy     chyr    chyy    chyh
shi             shy     shyr    shyy    shyh
ri              ry      ryr     ryy     ryh
zi              tzy     tzyr    tzyy    tzyh
ci              tsy     tsyr    tsyy    tsyh
si              sy      syr     syy     syh
...

FINAL_MAPPING

Value:
'''
a               a       ar      aa      ah              ha      a
o               o       or      oo      oh              ho      o
e               e       er      ee      eh              he      e
ai              ai      air     ae      ay              hai     ai
ei              ei      eir     eei     ey              hei     ei
ao              au      aur     ao      aw              hau     au
ou              ou      our     oou     ow              hou     ou
...

PINYIN_FINAL_MAPPING

Value:
{'iu': 'iou',
 'iur': 'iour',
 'u:': u'ü',
 'u:an': u'üan',
 'u:anr': u'üanr',
 'u:e': u'üe',
 'u:er': u'üer',
 'u:n': u'ün',
...