コード例 #1
0
 def testToTheOrdinal(self):
     self.assertEqual(toTheOrdinal(-1), "Le Dernier")
     self.assertEqual(toTheOrdinal(-2, True), "L'Avant-Dernier")
     self.assertEqual(toTheOrdinal(-2, False), "l'avant-dernier")
     self.assertEqual(toTheOrdinal(1), "La Premier")
     self.assertEqual(toTheOrdinal(2, False), "la deuxième")
     self.assertEqual(toTheOrdinal(3), "Le Troisième")
     self.assertEqual(toTheOrdinal(4), "Le Quatrième")
     self.assertEqual(toTheOrdinal(5), "Le Cinquième")
コード例 #2
0
 def testToTheOrdinal(self):
     self.assertEqual(toTheOrdinal(-1), "Le dernier")
     self.assertEqual(toTheOrdinal(-2, True), "L'avant-dernier")
     self.assertEqual(toTheOrdinal(-2, False), "l'avant-dernier")
     self.assertEqual(toTheOrdinal(1), "La premier")
     self.assertEqual(toTheOrdinal(2, False), "la deuxième")
     self.assertEqual(toTheOrdinal(3), "Le troisième")
     self.assertEqual(toTheOrdinal(4), "Le quatrième")
     self.assertEqual(toTheOrdinal(5), "Le cinquième")
コード例 #3
0
 def testToTheOrdinalNum(self):
     self.assertEqual(toTheOrdinal(6), "The 6th")
     self.assertEqual(toTheOrdinal(11), "The 11th")
     self.assertEqual(toTheOrdinal(12), "The 12th")
     self.assertEqual(toTheOrdinal(13), "The 13th")
     self.assertEqual(toTheOrdinal(21), "The 21st")
     self.assertEqual(toTheOrdinal(102), "The 102nd")
     self.assertEqual(toTheOrdinal(6543), "The 6543rd")
コード例 #4
0
 def testToTheOrdinal(self):
     self.assertEqual(toTheOrdinal(-1), "The Last")
     self.assertEqual(toTheOrdinal(-2, False), "the penultimate")
     self.assertEqual(toTheOrdinal(1), "The First")
     self.assertEqual(toTheOrdinal(2), "The Second")
     self.assertEqual(toTheOrdinal(3), "The Third")
     self.assertEqual(toTheOrdinal(4), "The Fourth")
     self.assertEqual(toTheOrdinal(5), "The Fifth")
コード例 #5
0
 def testToTheOrdinalNum(self):
     self.assertEqual(toTheOrdinal(6), "La 6me")
     self.assertEqual(toTheOrdinal(11), "La 11me")
     self.assertEqual(toTheOrdinal(12), "La 12me")
     self.assertEqual(toTheOrdinal(13), "La 13me")
     self.assertEqual(toTheOrdinal(21), "La 21me")
     self.assertEqual(toTheOrdinal(102), "La 102me")
     self.assertEqual(toTheOrdinal(6543), "La 6543me")
コード例 #6
0
 def testToTheOrdinal(self):
     self.assertEqual(toTheOrdinal(-1), "The last")
     self.assertEqual(toTheOrdinal(-2, False), "the penultimate")
     self.assertEqual(toTheOrdinal(1), "The first")
     self.assertEqual(toTheOrdinal(2), "The second")
     self.assertEqual(toTheOrdinal(3), "The third")
     self.assertEqual(toTheOrdinal(4), "The fourth")
     self.assertEqual(toTheOrdinal(5), "The fifth")