def testDamerauLevenshteinTransposition(self): self.assertEquals(1, _helpers._DamerauLevenshtein('kitten', 'ktiten'))
def testDamerauLevenshteinEmpty(self): self.assertEquals(5, _helpers._DamerauLevenshtein('', 'kites')) self.assertEquals(6, _helpers._DamerauLevenshtein('kitten', ''))
def testDamerauLevenshteinCommutative(self): self.assertEquals(2, _helpers._DamerauLevenshtein('kitten', 'kites')) self.assertEquals(2, _helpers._DamerauLevenshtein('kites', 'kitten'))
def testDamerauLevenshteinId(self): self.assertEquals(0, _helpers._DamerauLevenshtein('asdf', 'asdf'))
def testDamerauLevenshteinTransposition(self): self.assertEqual(1, _helpers._DamerauLevenshtein('kitten', 'ktiten'))
def testDamerauLevenshteinCommutative(self): self.assertEqual(2, _helpers._DamerauLevenshtein('kitten', 'kites')) self.assertEqual(2, _helpers._DamerauLevenshtein('kites', 'kitten'))
def testDamerauLevenshteinEmpty(self): self.assertEqual(5, _helpers._DamerauLevenshtein('', 'kites')) self.assertEqual(6, _helpers._DamerauLevenshtein('kitten', ''))
def testDamerauLevenshteinId(self): self.assertEqual(0, _helpers._DamerauLevenshtein('asdf', 'asdf'))