Exemple #1
0
    def setUp(self):
        NeedsDatabaseTest.setUp(self)
        self.f = ReadingFactory(dbConnectInst=self.db)

        try:
            import PyICU

            self.toNumeric = PyICU.Transliterator.createInstance(
                "Latin-NumericPinyin", PyICU.UTransDirection.UTRANS_FORWARD)
            self.fromNumeric = self.toNumeric.createInverse()
        except ImportError:
            pass
Exemple #2
0
    def setUp(self):
        NeedsDatabaseTest.setUp(self)
        self.fromReading, self.toReading = self.CONVERSION_DIRECTION

        for clss in self.getReadingConverterClasses().values():
            if self.CONVERSION_DIRECTION in clss.CONVERSION_DIRECTIONS:
                self.readingConverterClass = clss
                break
        else:
            self.readingConverterClass = None

        self.f = ReadingFactory(dbConnectInst=self.db)
Exemple #3
0
 def setUp(self):
     NeedsDatabaseTest.setUp(self)
     self.characterLookup = characterlookup.CharacterLookup(
         'T', dbConnectInst=self.db)
Exemple #4
0
 def setUp(self):
     NeedsDatabaseTest.setUp(self)
     self.characterLookup = characterlookup.CharacterLookup('T',
         dbConnectInst=self.db)