def testCorrectCase(self):
     self.assertEquals(correct_case("a", ["A", "B"]), "A",
                       "case not corrected")
     self.assertEquals(correct_case("a", ["C", "B"]), "a",
                       "changed despite no matches")
     self.assertEquals(
         correct_case("flippertigibbet", ["A", "B", "FlipperTiGibbet"]),
         "FlipperTiGibbet", "case not corrected")
示例#2
0
 def testCorrectCase(self):
     self.assertEquals(correct_case("a", ["A", "B"]), "A", "case not corrected")
     self.assertEquals(correct_case("a", ["C", "B"]), "a", "changed despite no matches")
     self.assertEquals(correct_case("flippertigibbet", ["A", "B", "FlipperTiGibbet"]), "FlipperTiGibbet", "case not corrected")
示例#3
0
 def canonicalise(self, wsNames):
     if self.worksheetReference:
         self.worksheetReference = correct_case(self.worksheetReference, wsNames)