# -*- coding: UTF=8 -*-
import os
import sys
import unittest
import tomoe
import test_dict

#class TestDictUnihan(tomoe.Dict):
#    def register_char(self, char):
#        return True
#
#    def unregister_char(self, char):
#        return True

class TomoeDictUnihanTest(test_dict.TomoeDictTest):
    def setUp(self):
        self.dict = tomoe.Dict("Unihan")

    def testRegisterChar(self):
        return

    def testUnregisterChar(self):
        return

    def testUnknownReadingSearch(self):
        """
        Unihan dicitionary has no unknown-reading character
        """
        return

    def testUnknownKunReadingSearch(self):
        """
        Unihan dicitionary has no unknown-reading character
        """
        return

    def testOnUnknownReadingSearch(self):
        """
        Unihan dicitionary has no unknown-reading character
        """
        return

    def testKunUnknownReadingSearch(self):
        """
        Unihan dicitionary has no unknown-reading character
        """
        return

# vi:ts=4:nowrap:ai:expandtab

@@ -596,151 +596,8 @@
 rn%0A%0A
-    def testUnknownKunReadingSearch(self):%0A        %22%22%22%0A        Unihan dicitionary has no unknown-reading character%0A        %22%22%22%0A        return%0A%0A
     
@@ -626,32 +626,32 @@
 ngSearch(self):%0A
+
         %22%22%22%0A    
@@ -853,32 +853,32 @@
 ter%0A        %22%22%22%0A
-
         return%0A%0A
@@ -877,16 +877,1911 @@
 return%0A%0A
+    def testUnknownKunReadingSearch(self):%0A        char_codes = %5B '%E6%B1%A0', '%E5%9E%B3', '%E6%B1%AA', '%E6%BA%8F', '%E6%BD%A2' %5D%0A        reading = '%E3%81%84%E3%81%91'%0A        tomoe_reading = tomoe.Reading(tomoe.READING_UNKNOWN, reading)%0A        tomoe_query = tomoe.Query()%0A        tomoe_query.add_reading(tomoe_reading)%0A%0A        candidates = self.dict.search(tomoe_query)%0A        for char, candidate in zip(sorted(set(char_codes)), sorted(self.dict.search(tomoe_query))):%0A            self.assertEqual(candidate.get_char().get_utf8(), char)%0A%0A    def testKunReadingSearch(self):%0A        char_codes = %5B '%E6%B1%A0', '%E5%9E%B3', '%E6%B1%AA', '%E6%BA%8F', '%E6%BD%A2' %5D%0A        reading = '%E3%81%84%E3%81%91'%0A        tomoe_reading = tomoe.Reading(tomoe.READING_JA_KUN, reading)%0A        tomoe_query = tomoe.Query()%0A        tomoe_query.add_reading(tomoe_reading)%0A%0A        candidates = self.dict.search(tomoe_query)%0A        for char, candidate in zip(sorted(set(char_codes)), sorted(self.dict.search(tomoe_query))):%0A            self.assertEqual(candidate.get_char().get_utf8(), char)%0A%0A    def testOnReadingSearch(self):%0A        char_codes = %5B '%E5%9E%B3' %5D%0A        reading = '%E3%82%AC%E3%82%B1'%0A        tomoe_reading = tomoe.Reading(tomoe.READING_JA_ON, reading)%0A        tomoe_query = tomoe.Query()%0A        tomoe_query.add_reading(tomoe_reading)%0A%0A        candidates = self.dict.search(tomoe_query)%0A        for char, candidate in zip(sorted(set(char_codes)), sorted(self.dict.search(tomoe_query))):%0A            self.assertEqual(candidate.get_char().get_utf8(), char)%0A%0A    def testUnknownOnReadingSearch(self):%0A        char_codes = %5B '%E5%9E%B3' %5D%0A        reading = '%E3%82%AC%E3%82%B1'%0A        tomoe_reading = tomoe.Reading(tomoe.READING_JA_ON, reading)%0A        tomoe_query = tomoe.Query()%0A        tomoe_query.add_reading(tomoe_reading)%0A%0A        candidates = self.dict.search(tomoe_query)%0A        for char, candidate in zip(sorted(set(char_codes)), sorted(self.dict.search(tomoe_query))):%0A            self.assertEqual(candidate.get_char().get_utf8(), char)%0A%0A
 # vi:ts=

implement some test.