Esempio n. 1
0
 def testOrdinal2word(self):
     testList = self.testDict["ordinal"]
     for i, (t, gt) in enumerate(testList):
         tList = t.split(" ")
         gt = " ".join(gt.split(" ")[1:])
         r = NumberFormula._ordinal2word(tList, 1)
         self.assertEqual(gt, r, "%s is not %s" % (r, gt))
 def testOrdinal2word(self):
     testList = self.testDict["ordinal"]
     for i, (t, gt) in enumerate(testList):
         tList = t.split(" ")
         gt = u" ".join(gt.split(" ")[1:])
         r = NumberFormula._ordinal2word(tList, 1)
         self.assertEquals(gt.encode('utf-8'), r.encode('utf-8'), 
                           "%s is not %s" % (r.encode('utf-8'), gt.encode('utf-8')))
Esempio n. 3
0
 def testOrdinal2word(self):
     testList = self.testDict["ordinal"]
     for i, (t, gt) in enumerate(testList):
         tList = t.split(" ")
         gt = u" ".join(gt.split(" ")[1:])
         r = NumberFormula._ordinal2word(tList, 1)
         self.assertEquals(
             gt.encode('utf-8'), r.encode('utf-8'),
             "%s is not %s" % (r.encode('utf-8'), gt.encode('utf-8')))